asset_ img_ url
string | asset_img_url
returns string
Returns the CDN URL for an image in the
assets
directory of a theme.
{{ 'red-and-black-bramble-berries.jpg' | asset_img_url }}
{{ 'red-and-black-bramble-berries.jpg' | asset_img_url }}
Output
//polinas-potent-potions.myshopify.com/cdn/shop/t/4/assets/red-and-black-bramble-berries_small.jpg?323
Anchor to size
size
image | asset_img_url: string
By default, the filter returns the
small
version of the image (100 x 100 px). However, you can specify a size.
{{ 'red-and-black-bramble-berries.jpg' | asset_img_url: 'large' }}
{{ 'red-and-black-bramble-berries.jpg' | asset_img_url: 'large' }}
Output
//polinas-potent-potions.myshopify.com/cdn/shop/t/4/assets/red-and-black-bramble-berries_large.jpg?323
Was this page helpful?