asset_url
Filter
Returns the URL of an asset within the theme’s
assets
folder.
Parameters
None.
Category
Description
The asset_url
filter allows you to link up theme assets within your theme’s
assets
folder in your layouts and content templates.
When you push your theme to Live Editor’s servers, your theme’s assets are published to a content delivery network (CDN) for maximum performance. The final location within the CDN is assigned dynamically and is unguessable for anyone as a theme developer.
You’ll often chain the asset_url
with other
HTML filters like
img_tag
,
script_tag
, and
stylesheet_tag
.
It is important that you run the asset_url
filter first before passing it to one of
the other HTML filters.