How do I change the no image displayed when no products are available in a collection

Hello, I’m trying to wrap my head around how to fix this issue.

As you can see by this image, the “Niche” collection does not display any images. I understand why, as no products are available in the collection. The issue I have is, that the collection is set to only contain products with a stock greater than 0, so our customers do not have to deal with looking through our out-of-stocks, and I would like to keep it this way.

How can I attach an image that is displayed at all times, or preferably, a default image IF there should be no more products in this collection.

Hi @Noodles300 You can add the image in the collection section, where you have added this collection, may be it sounds like weird, but it is the way how you can solve this issue.

If you will unable to implement the same then I’m happy to do this for you, let me know. I can implement the changes so that this will work well for you.

Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!

Best Regards

Sahil

1 Like

Hi @Noodles300

Could you send your store link to check?

1 Like

I did already do this, however, the one thing I was missing was to edit the theme settings within the theme editor → Collection list (main block). Here I could set the collection to display the collection image, which solves this problem.

Thank you so much for the replies everyone!

1 Like

hy , @Noodles300

there is two way you can hide if there its no image in product

  1. you can manually hide the product

You can draft the product, and there is automatic functionality available through code.

{% if product.featured_image %}
{% endif %}

wrap in follow code like this

Is gonna work but lets if is you showing 50 so you see in this page 49 products and you have empty place.