Shopify Hide Specific Variant Images (Or Certain Amount) With 1 Line Of Code

Опубликовано: 16 Июль 2026
на канале: eCom Simplified
12,705
106

This is my Shopify tutorial for changing hiding a specific variant image/thumbnail or certain amount through one line of code.

There are many reasons why this may be, for example when a product have too many images and thus making the product page messy and not professional.

I created this tutorial because this is isn't something that can be changed by default through the theme editor and can be quite easily done with a CSS trick.

Feel free to comment! If you found this useful please like and subscribe :)

Coding snippets used:
For specific position (ie, position 3):
.product-single__thumbnails li:nth-child(3){display:none}

For a certain amount (ie, only show 3 images maximum):
.product-single__thumbnails li:nth-child(n+4){display:none}

●▬▬▬▬▬▬▬▬▬▬▬▬▬▬●
Affiliate links:

Ecommerce Empire Academy - Ecommerce Empire Builders Is The Award-winning Leader In Teaching Others How To Build Profitable Ecommerce Sales Funnels:
https://bit.ly/3xftzla

Find Your Perfect Product and Supplier in Minutes!
https://bit.ly/3iCVYh9

Discover 7 Ways to Create a Sustainable, Passive Income for Life.
The Richdad Summit - By Robert Kiyosaki
https://bit.ly/3gyg60W
●▬▬▬▬▬▬▬▬▬▬▬▬▬▬●