DEV Community

Cover image for Alt Text for WooCommerce Variation Images
Benjamin Oats
Benjamin Oats

Posted on • Originally published at oppti.dev

Alt Text for WooCommerce Variation Images

Alt Text for WooCommerce Variation Images

Alt text for WooCommerce variation images is the gap almost nobody checks. You set alt text on the main product image, feel like the job is done, and move on. But a variable product — a t-shirt in six colours, a mug in three sizes — has a separate image for each variation, and every one of those images is its own attachment in the media library with its own empty alt field.

So the "Red" swatch swaps in a photo with no alt text. The "Blue" swatch swaps in another with no alt text. To Google and to a screen reader, those variation photos may as well not exist. This post explains why WooCommerce variation images slip through, what good alt text for a variant actually says, and how to fill the gaps without opening every product by hand.

Why variation images escape your alt text

The reason is structural, not carelessness. A WooCommerce variable product isn't one product with one image. It's a parent product plus a set of variations, and each variation can point to its own image attachment.

When you edit a product, you set the main image and the gallery in the top-right panels. Those are the images most people remember to describe. But the per-variation images live somewhere else entirely: inside the Variations tab, each variation row has its own small image slot. You click into the variation, assign a photo, and WooCommerce stores that photo as a normal media attachment — with the alt field left blank unless you fill it in the Media Library separately.

Two things make this worse. First, variation images are often uploaded in bulk, straight into a product, so they never pass through the Media Library screen where you'd normally type alt text. Second, most alt text plugins and audits only look at the featured image and gallery. They report the product as "has alt text" because the main image does, while every variation photo underneath stays empty. The count looks healthy and the problem stays hidden.

The result is predictable. A store with 200 variable products and five variations each has 1,000 variation images. If none of them carry alt text, that's 1,000 photos invisible to Google Images and unreadable to anyone using assistive technology — on the exact images a shopper looks at when choosing which version to buy.

What good alt text for a variation actually says

The trap with variants is repetition. If every variation of a t-shirt reads "cotton t-shirt", you've technically filled the field and told Google nothing useful. The whole point of a variation image is that it differs from its siblings, so the alt text has to capture that difference.

Name the variation attribute in the description. For a colour variant, that means the colour. For a size or material variant, the size or material. A good pattern is product + variation attribute + relevant visual detail:

  • "Merino wool jumper in forest green, folded flat" — not "jumper".
  • "Ceramic mug, 15oz size, matte black glaze" — not "ceramic mug".
  • "Running shoe in blue and white, side profile" — not "running shoe".

Keep it to a natural sentence fragment, under about 125 characters, and describe what's in the photo rather than stuffing keywords. If the colour is the thing the customer is choosing, the colour is the single most important word in that alt text. Avoid starting with "image of" — screen readers already announce it as an image, so those words are wasted. And don't repeat the product title verbatim across every variant; the differentiator is what earns the image its place in image search.

There's a real payoff here. Colour and attribute searches — "green merino jumper", "matte black mug" — are high-intent queries, and Google Images leans on alt text to match them. Variation alt text is one of the few places where accessibility and commercial SEO point in exactly the same direction.

How to fix WooCommerce variation image alt text

Here's a practical walkthrough for finding and fixing the gaps, starting manual and ending with the faster route.

  1. Find your variable products. In WooCommerce, go to Products and filter or sort by product type to isolate variable products. These are the ones with per-variation images to worry about.
  2. Open one product's Variations tab. Edit a product, open the Variations tab, and expand a variation. Note the image assigned to it — click it to see the attachment in the Media Library.
  3. Check the alt field. In the Media Library detail for that variation image, look at the Alternative Text field. On most stores it's blank. That confirms the gap you're checking for.
  4. Write the differentiator. Fill the alt field using the product + attribute + detail pattern above, leading with whatever the variation changes — usually colour, size, or material.
  5. Repeat across variations, then products. Do the same for each variation image. This is the honest, slow way, and it works — but on a large catalogue it's the afternoon-gone problem multiplied by every variant.
  6. Audit before you commit to the manual route. Before hand-editing hundreds of images, run a scan that counts variation images specifically, not just featured images, so you know the real size of the gap. Our free image SEO audit checks your library and shows what's missing.
  7. Generate in bulk where it makes sense. For large catalogues, a tool that reads each variation image and writes a description saves the bulk of the work. The OpptiAI Alt Text plugin covers variation attachments, not only the main product image, so the variants stop being the blind spot. Review the output and adjust anything the model got wrong — you know your products better than any generator does.

Whichever route you take, the check that matters is the same: after the work, open a variable product, switch between variations on the front end, and confirm each swapped-in image carries alt text that names its variant.

Frequently asked questions

Do WooCommerce variation images need separate alt text from the main product image?

Yes. Each variation image is a distinct media attachment with its own alt field, and it shows a genuinely different photo — a different colour or style of the same product. The main image's alt text doesn't carry over. If you leave variation images blank, those photos have no alt text at all, regardless of what the featured image says. Since variation images are exactly what a shopper studies when choosing a variant, they're worth describing individually rather than treating as duplicates of the parent.

Why do most alt text checkers say my products are fine when variation images are empty?

Most alt text audits only inspect the featured image and product gallery, because that's where WordPress and WooCommerce surface images most obviously. Per-variation images are stored slightly out of the way, inside each variation row, so a lot of tools skip them. The audit sees the main image has alt text, marks the product as covered, and never looks at the variation attachments underneath. That's why a store can show a clean alt text report while hundreds of variation photos sit empty.

What should alt text for a colour variation say?

Lead with the colour, because that's what the variation changes and what shoppers search for. Follow the pattern product + colour + a short visual detail, for example "linen shirt in sage green, buttoned front". Keep it under roughly 125 characters, describe what's actually in the photo, and don't repeat the plain product name across every colour — the colour word is what lets Google match a query like "sage green linen shirt" to your image. Skip "image of"; a screen reader already announces it as an image.

Fix the images you can't see

Variation images are the quiet blind spot in WooCommerce SEO: real photos, real shopper intent, empty alt fields, and audits that miss them. The fix is straightforward once you know where to look — describe the difference each variant shows, lead with the attribute customers search for, and check variation attachments rather than trusting a featured-image-only report.

If you'd rather see the size of the gap before deciding how to tackle it, run the free image SEO audit to count what's missing across your catalogue. When you're ready to clear it at scale, the OpptiAI Alt Text plugin writes alt text for variation images too, so the variants stop hiding from search and screen readers alike.

Top comments (0)