Filter out products without images from collection page

Hello there,

I have several collection pages that are showing products without product images. Currently just a generic placeholder image is showing up. Sample page: https://logicdistributiongroup.com/collections/dme

I would like to add a code snippet to the collection page so the products (without images) do not appear on the collection grid list. I do not want to delete the products themselves.

I’ve seen paid solutions and/or plugins but I would like to accomplish this by tweaking the code for the page itself. Thoughts on this?

I’ve seen multiple post requesting this but no solutions as of yet. Appreciate your help in advance!! :slightly_smiling_face:

Thanks!

Hi There!

It is certainly doable by comparing the number of images a product has with 0 and then deciding whether or not the code should be executed. It should be in the product-grid.liquid or collection-page.liquid.

The logic is relatively straightforward but the implementation is a bit time consuming, hence the reason a public solution is not available and would require custom coding here.

Let me know if you need someone to help you implement this feature.

Cheers!