How to get the URL of an image in the assets folder of Shopify using Liquid?

To get the URL of an image in the assets folder of Shopify using Liquid, you can use the asset_url filter. Here’s how you can do it:

First of all, if the image is not already uploaded, upload it to the assets folder.

image in the assets folder - Shopify

Then copy and paste the code below where you want to display your image:

{{ 'your-image-file-name.jpg' | asset_url }}

Replace ‘your-image-file-name.jpg’ with the actual name of your image file. This will generate the URL for the image located in the assets folder of your Shopify theme.

Close