> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/volume-themes/faq/products-and-variants/how-do-i-show-only-the-images-of-the-selected-variant.md).

# How do I show only the images of the selected variant?

How to make the Volume product gallery show only the images that belong to the selected variant, using image alt text.

Volume can filter the gallery so a customer choosing **Blue** sees only the blue photos. It groups images by **alt text**, not by Shopify's variant image field alone, and that is why it looks broken the first time.

{% stepper %}
{% step %}

### Assign one image to each variant in Shopify

In **Products → your product → Variants**, open each variant and attach an image to it. The filter only switches on when at least one image is assigned to a variant and the product has real variants — on a product with a single default variant it stays off no matter what you do in the theme editor.
{% endstep %}

{% step %}

### Turn the filter on

In **Customize**, open a product template, select the **Product overview** section, and under **Media** tick **Display only media related to the chosen variant**.
{% endstep %}

{% step %}

### Tag every image in its alt text, in round brackets

Open each image in **Products → your product → Media → Edit alt text** and add the tag in **round brackets** at the end:

* `Linen shirt, front (Blue)`
* `Linen shirt, detail (Blue)`
* `Linen shirt, front (Sand)`

The brackets are required. The theme reads the **last** pair of brackets in the alt text, ignoring case, and treats that as the image's group.
{% endstep %}

{% step %}

### Tag the variant's own image the same way

This is the step that is usually missed. The theme does not read the variant title — it reads the alt text of the **image assigned to that variant**, and shows every other image carrying the same bracketed tag. If the blue variant's image is untagged, or tagged `(Navy)` while the rest say `(Blue)`, nothing lines up and the customer sees a single photo.

Because the comparison is alt text against alt text, the tag does not have to match the option name. `(Blue)`, `(blue)` and `(b-01)` all work, as long as the variant's image and its siblings use the identical wording.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
An image with **no brackets in its alt text** is not treated as neutral — it belongs to no group and gets hidden once the filter is active. If you want a size chart or a fabric close-up to appear on blue and sand alike, add it twice, once tagged `(Blue)` and once tagged `(Sand)`.

Videos, 3D models and other non-image media are the exception: they are always shown, for every variant.
{% endhint %}

{% hint style="warning" %}
Alt text is also what screen readers announce and what search engines read. Keep a real description in front of the brackets rather than writing just `(Blue)`.
{% endhint %}

{% hint style="success" icon="lightbulb" %}
Next to this setting sits **Show images in the same order as they appear in the admin panel.** Leave it off and the theme pulls the selected variant's own image to the front of the gallery; switch it on and the gallery keeps your admin order exactly.
{% endhint %}

{% hint style="success" icon="lightbulb" %}
Step-by-step walkthrough with screenshots: [Display Only Media Related to the Chosen Variant](/docs/volume-themes/products/display-only-media-related-to-the-chosen-variant.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://staylime.com/docs/volume-themes/faq/products-and-variants/how-do-i-show-only-the-images-of-the-selected-variant.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
