> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/swatch/assign-images/group-images-by-swatch.md).

# Group images by swatch

This feature displays only the images associated with the selected variant, creating a more relevant and streamlined shopping experience for your customers.

A product with four colours often has a gallery of twenty photos. Without any grouping, a shopper who picks Black still scrolls past every Pink and White photo.

**Group images by swatch** hides every image that doesn't belong to the selected value, so customers only see the images relevant to the variant they picked.

You set it up on the **Assign images** page in the app. There's no separate switch to turn on — when you save your first image assignment, the app turns image grouping on for your store.

The gallery changes when the shopper picks a value in an option shown with a colour or image: **Color or custom image swatch**, **Pill swatch**, **Variant image swatch**, **Variant image swatch with price**, **Color or custom swatch with price**, **Color or custom swatch dropdown** or **Variant image dropdown**. To have options shown as buttons or a plain **Dropdown** change it too, turn on **Use dynamic variant image** in **Settings → Swatch on Product Page**. On products with several options, it also keeps image swatches and prices in step with the shopper's choices — see [Use dynamic variant image](/swatch/settings/swatch-on-product-page.md#use-dynamic-variant-image).

## Set it up

Before you start, the product needs its photos uploaded in Shopify. If you've added or changed images recently, click **Update data** first so the app sees them — see [Sync product data](/swatch/getting-started/sync-product-data.md).

<figure><img src="https://3138853960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDsbeTbRNMPUo58YEXkMj%2Fuploads%2Fgit-blob-849373fc74be15d809b7400924c22d7f4e763472%2Fimage%20(61).png?alt=media" alt="The Assign images page listing the products that already have images assigned"><figcaption><p>Start from <strong>Configure new product</strong>, then assign images to each option value.</p></figcaption></figure>

{% stepper %}
{% step %}

### Assign the images

Go to **Assign images**, click **Configure new product** (or **Select product** on the empty state) and pick a product that has variants and images. Then drag each image onto the option value it belongs to.

See [Assign images to option values](/swatch/assign-images/assign-images-to-option-values.md).
{% endstep %}

{% step %}

### Save

Click **Save**. Image grouping is now on for your store — nothing else to enable.
{% endstep %}

{% step %}

### Check the storefront

Open the product page and click through the swatches. The gallery should change with each one.
{% endstep %}
{% endstepper %}

{% embed url="<https://www.youtube.com/watch?v=4tw_ve9evEg>" %}
Video guide — assigning images in the app
{% endembed %}

## **Want to save time assigning product images?**

Besides manually assigning images to each swatch option, you can also use AI to automate the process. Check out our [Auto Assign Images with AI guide](https://docs.globo.io/swatch/assign-images/auto-assign-ai) to learn how to automatically assign product images with AI.

## If the images don't change

Some themes have their own version of this — a setting along the lines of *hide other variants' media after selecting a variant*. Two systems filtering the same gallery fight each other. Go to **Online Store → Themes → Customize** and turn the theme's setting off, so only the app is filtering.

Also check that:

* the app embed is on for the theme you're viewing;
* the product's images are assigned under **Assign images** and you clicked **Save**;
* product data has been synced since you last changed images in Shopify;
* your theme's own variant picker is still enabled;
* the option the shopper changes is shown with a colour or image — or **Use dynamic variant image** is on.

If it still doesn't work, [contact support](/swatch/help/contact-support.md) — some newer theme versions need a small adjustment from us.

## Where to go next

* [Assign images to option values](/swatch/assign-images/assign-images-to-option-values.md)
* [Shared images across all variants](/swatch/assign-images/shared-images-across-all-variants.md)
* [Auto Assign AI](/swatch/assign-images/auto-assign-ai.md)
