Replace the product 'no image' placeholder with a custom image, Debut theme

Highlighted
New Member
2 0 0

Hi, I'm using the Debut theme and wanting to replace the product 'no image' placeholder with a custom image. I have used the advice from this forum post https://community.shopify.com/c/Shopify-Design/How-to-add-a-custom-quot-no-image-quot-image/td-p/212...

I have uploaded my 'no-image.png' to the assets folder and entered the if statement in Sections/product-template, line 48:

<img src="{% if product.featured_media.size > 0 %}{{ product.featured_media | img_url: product_image_size, scale: product_image_scale }}{% else %}{{ 'no-image.png' | asset_url }}{% endif %}" alt="{{ featured_media.alt }}" id="FeaturedMedia-{{ section.id }}" class="product-featured-media" style="max-width: {{ height }}px;">

 

However, the images are not changing. When I inspect them, they appear to be generated through the collections template, but there is not img tag there with a src to add the if statement to.

 

I have a feeling I'm adding this in the wrong file or not linking the names properly. 

 

Please could someone advise me on how I can successfully display my custom 'no-image.png'. Thanks!

0 Likes
Highlighted
New Member
1 0 0

I am having the same issue - i added to the product-images.liquid but is is not changing the default "No Image"

0 Likes