Hide First and second image in product page

Hello,

I want to hide the first and the second images on my product page, or hide a specific images, I use Ella Theme
I’m trying a lot of solution my without resultat if someone can help me.

Hello @ameliaprints ,

You can try to follow these steps:

  • Go to Online Store → Themes → Actions → Edit code
  • Go to Template → product.liquid file
  • To hide specific images, you can use the capture tag to assign an index to each image within the loop. Replace the existing code block with the following:
{% for image in product.images %}
  {% capture image_index %}{{ forloop.index }}{% endcapture %}
  {% if image_index != '1' and image_index != '2' %}
    
  {% endif %}
{% endfor %}
  • Save and preview

Hope this can help. Let us know if you need any further support

Ali Reviews team.

1 Like

Thanks @irene-vintage for your reply.
I’m a beginner if you can explain more for me, you find the code in attached media