Write product image alt text for its context

Use the same product photo to communicate the detail a shopper or care-guide reader needs.

Asset preparation3 min read

The same product photo can answer different questions in different places. On a listing, a shopper may need to know what the item looks like. In a care guide, the surface detail that the instructions refer to may matter more. Write the alternative for the image's job on that page, using what the surrounding text already says.

Start with the image and its surroundings

Deep blue mug with a curved handle, close vertical ridges and a smooth rim

The mug is an illustration for this exercise.

Imagine it appears as a non-linked image next to the listing title “Blue mug.” The title identifies the item, but says nothing about its shape or surface. A useful alternative is:

HTML
<img src="blue-mug.jpg" alt="Deep blue mug with a curved handle and vertical ridges">

The alternative supplies visible features a shopper cannot get from the title alone. It doesn't need to repeat a price or describe the lighting. Avoid claims such as “dishwasher-safe” or a specific material unless those facts are verified elsewhere; a photograph alone may not establish them.

Change the emphasis in a care guide

Now use that same photo beside a guide section that discusses cleaning around the ridges. Assume the section mentions the ridges but does not describe their appearance. The useful visual detail shifts:

HTML
<img src="blue-mug.jpg" alt="Closely spaced vertical ridges cover the mug below its smooth rim">

This gives the reader the surface detail the image contributes to that passage. The actual cleaning method belongs in the guide's text and must come from verified product instructions; the image cannot establish it. If the text explains the detail fully, reassess whether the image adds anything the reader needs.

When an empty alternative fits

Suppose the same section already says: “The mug has closely spaced vertical ridges below a smooth rim,” and the image adds no other information relevant to that section. In that context the image duplicates the text, so use alt="":

HTML
<p>The mug has closely spaced vertical ridges below a smooth rim.</p>
<img src="blue-mug.jpg" alt="">

Keep the empty attribute rather than omitting alt. If the photo still communicates a relevant detail the text leaves out, describe that detail instead. W3C's informative images guidance explains this context-dependent judgment; its alt decision tree also covers redundant images.

Check it in the page

Read the nearby heading, text, and image alternative together. Can someone identify the relevant appearance or surface detail without seeing the photo? Is anything repeated or inferred from pixels that cannot prove it? Inspect the rendered image element to confirm that the intended alt is present, then check the experience in context with a screen reader.

These examples describe non-linked images. When an image is itself a link or button, its action or destination can determine its accessible name; see how to name image links.

Image tools
All guides
Write product image alt text for its context | Formatry Media — Formatry