Image issue - not showing

amurray4
Shopify Partner
3 0 0

I feel like this is a simple issue but I've had a few problems now. I'm just to display an image I have uploaded into files with <img src="{{ 'defaultcollection.jpg' | asset_url }}" /> - it's just displaying the broken image icon. If I copy in the url https://cdn.shopify.com/s/files/1/1396/0463/files/defaultcollection.jpg?13042980317671635283 it displays fine. I'm wanting to do it the first way so it is able to be changed easily rather than go into the code and adjust it.

How am I able to get this to display? Thanks.

0 Likes
Chantal3
Shopify Staff
Shopify Staff
48 0 34

Hey amurray4,

If you upload that image to the theme's assets, this code will work for you :)

Online store > Themes > Ellipses (...) > Edit HTML/CSS > Assets > Add a new asset > Upload file

Hope this helps!

Chantal, Shopify Guru
 

Chantal, Shopify Guru
0 Likes
Likius
New Member
1 0 1

Hi, 

 

I have the same issue. Once I insert the URL it only shows a broken image sign. I am trying to insert the URL from Canva. The option to upload image does not work for me, because once I transform the URL into JPG it loses the effects I want. 

 

Thank you in advance

MikeHacine
New Member
3 0 0

Hi,

 

I have the same issue; I uploaded my picture to assets and file and in both cases not showing in page!!!

0 Likes