---
title: "Switch product and gallery images based on selected variant"
description: "How to auto-switch main product image and gallery images by variant (e.g. color or style)"
url: https://help.cartgenie.com/en/articles/115-switch-product-and-gallery-images-based-on-selected-variant
collection: "Products & Categories FAQ"
updated: 2025-12-09
language: en
---

# Switch product and gallery images based on selected variant

How to auto-switch main product image and gallery images by variant (e.g. color or style)

Give your customers a clearer, smoother shopping experience. CartGenie can automatically update the main product image when a shopper selects a variant—like showing the red shirt when they choose “Red.”

If you’re using our product page template, **this happens automatically**. All you need to do is paste in our product page template and we’ll do the rest!

![](https://staticfiles.gleap.io/ghelparticle/2cmrlc0hbd5LdwkjdocbhaDxo7O4LD5HfTw6NkNqo3vRIkgs66y0p7aUqHOHMgiQpbTDKrb5hlq.png)

Or if you’re building a product page with components, simply use our **“Image” component** under Products in your page and we’ll auto-switch the main image based on the variant selected.

![](https://staticfiles.gleap.io/ghelparticle/QtDzv17IglMeyMRu1k1MtTdzRtK6ys7u4tLmXxdQSwv7APZiGGGE2A2tPFYzmlL0kfea1AHTyZe.png)

If you’re using our **“Image + Gallery” component** [(see guide here)](https://help.cartgenie.com/en/articles/114-how-to-add-an-image-gallery-to-the-product-page.md), then CartGenie will also automatically switch out any gallery photos (from the “extra images” field in CartGenie) for the variant selected.
