Skip to main content

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 }}

Output

//polinas-potent-potions.myshopify.com/cdn/shop/t/4/assets/red-and-black-bramble-berries_small.jpg?323
image | asset_img_url: string

By default, the asset_img_url 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' }}

Output

//polinas-potent-potions.myshopify.com/cdn/shop/t/4/assets/red-and-black-bramble-berries_large.jpg?323
Was this page helpful?