1
votes

How do i reference an image on my .liquid page from Files? I've tried {{ 'pin.png' | asset_url | img_tag }} which returns img src="//cdn.shopify.com/s/files/1/0930/7298/t/3/assets/pin.png?15115092952342036334" alt="" which is a broken image link for me.

Any ideas?

2
why is it a broken image link? did you try to append the http before the url?alexandresaiz

2 Answers

1
votes

The correct filter to use for file urls (not asset urls) is file_url. Take note of the documentation for more info. For your example you'd be looking for something more like so:

{{ 'pin.png' | file_url | img_tag  }}
0
votes

I just ended up copying the source from the file