Website Building » Shopify » How Do I Hide Product Variant Images on Shopify?

How Do I Hide Product Variant Images on Shopify?

Last updated on January 12, 2023 @ 1:47 pm

There are a few different ways that you can hide product variant images on Shopify. The first way is to go into the settings for your product and uncheck the “Variant Image” option.

This will hide all variant images from your product page. Another way to hide variant images is to add some code to your theme.liquid file. You can add the following code to your theme.liquid file:


< style >
.product-single__variant-image {display: none;}
< /style >

This code will hide all variant images on your product pages. If you only want to hide certain variant images, you can use CSS selectors to Target specific variants. For example, if you only want to hide the image for the “small” size variant, you can use the following code:

PRO TIP: If you are using Shopify to sell products, it is important to be aware that there is a potential for variant images to be displayed on your product pages. This could lead to customers seeing images of products that they are not interested in, which could result in them leaving your site without making a purchase. To avoid this, you can hide variant images on your Shopify product pages by following these simple steps:

1. Go to the ‘Settings’ section of your Shopify admin panel.

2. In the ‘Checkout’ tab, scroll down to the ‘Product Page’ section and look for the ‘Variant Images’ setting.

3. Change the setting from ‘Show all variant images’ to ‘Hide all variant images’.

4. Save your changes and you’re done!


< style >
.product-single__variant-image–small {display: none;}
< /style >

You can also use JavaScript to hide variant images. For example, you could add the following code to your product pages:

< script >
document.getElementsByClassName(‘product-single__variant-image’).style.display = ‘none’;
< /script >

< script > document.getElementsByClassName(‘product-single__variant-image–small’).display = ‘none’; < /script >

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.