Website Building » Shopify » How Do I Hide Variant Images in Shopify?

How Do I Hide Variant Images in Shopify?

Last updated on January 7, 2023 @ 11:30 am

There are many reasons why you might want to hide variant images in Shopify. Maybe you have products with multiple variants and want to keep the images clean and tidy on your product pages.

Or maybe you want to keep certain images hidden until a customer clicks on a particular variant. Whatever your reason, hiding variant images in Shopify is easy to do with a little bit of code.

To hide variant images in Shopify, all you need to do is add the following code to your theme’s CSS file:

.product-single__variant-image {display: none;}

This code will hide all variant images on your product pages. If you only want to hide certain variant images, you can add a class name to the code above. For example, if you only want to hide the image for the “red” variant, you would add the following code:

.product-single__variant-image.red {display: none;}

PRO TIP: If you are considering hiding variant images in Shopify, be aware that this may impact your sales negatively.Hidden variant images can make it difficult for customers to find the product they are looking for, and may cause them to leave your store without making a purchase. We recommend only hiding variant images if you are absolutely sure that it will not impact your sales.

You can also use this technique to hide variant images on other parts of your Shopify store, such as the cart page or the checkout page. To do this, simply add the appropriate class name to the code above. For example, to hide variant images on the cart page, you would add the following code:

.cart__variant-image {display: none;}

Hiding variant images is a great way to keep your product pages clean and tidy. It’s also a great way to control what information customers see on your store. By hiding certain images, you can ensure that customers only see what you want them to see.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.