Every image on a web page can have a short text alternative, written in the alt attribute of the image. Most visitors never see it. Yet it does two important jobs: it makes the image accessible to people who cannot see it, and it helps search engines understand what the image shows.
On many websites, especially online shops with hundreds of product photos, alt text is missing, copied from the file name or filled with a list of keywords. This article explains what good alt text looks like and how to add it without spending weeks on it. The examples come from a fictional shop, Huis van Vlas, which sells home textiles and ceramics.
What alt text is for
The first purpose is accessibility. People who are blind or have low vision often use a screen reader, which reads the page out loud. When it reaches an image, it reads the alt text. Without alt text, the screen reader may read the file name, such as IMG_4471.jpg, or skip the image entirely. For a product photo, that means missing what the product looks like.
Alt text is also shown when an image does not load, for example on a slow connection, and it is part of accessibility standards such as WCAG, which many organisations are expected or required to follow.
The second purpose is search. Google uses alt text, together with computer vision and the text around the image, to understand what an image is about. That helps your images appear in Google Images and gives context to the page itself. Google calls alt text the most important attribute for providing information about an image in its image SEO best practices.
Both purposes ask for the same thing: a clear, honest description. Alt text that works well for a screen reader user is almost always good alt text for search too.
How to write good alt text
Imagine describing the image to someone on the phone who needs to know what it adds to the page. A few guidelines help:
- Describe what the image shows that matters in this context. A product photo needs the product and its visible details. A photo in a care guide needs what it demonstrates.
- Be specific. "Blanket" says little. "Grey merino wool blanket folded on the end of a bed" says a lot.
- Keep it short. One sentence is usually enough. Screen readers read it in full, and long alt text is tiring to listen to.
- Do not start with "image of" or "photo of". Screen readers already announce that it is an image.
- Use words people would use, including a relevant search term where it fits naturally. Do not add terms that are not true for the image.
- Do not repeat the text right next to the image word for word. Add what the image shows that the text does not.
Examples from a shop
Huis van Vlas sells a washed linen throw in five colours. The main product photo had the alt text "linen-throw-1", taken from the file name. Some other photos had "linen throw, linen blanket, throw blanket, linen, soft throw, cheap throw", a list of keywords.
Better alternatives, one for each photo:
- Main photo: "Washed linen throw in sage green draped over a wooden armchair".
- Detail photo: "Close-up of the soft, slightly creased texture of washed linen".
- Colour photo: "The linen throw in five colours: sand, sage, rust, slate and white, folded in a stack".
- Lifestyle photo: "Linen throw on a sofa next to a reading lamp in a living room".
Each one describes something different, and each one helps both a screen reader user and a search engine understand the product. None of them is stuffed with keywords. Google warns that filling alt attributes with keywords gives a bad user experience and may cause your site to be seen as spam.
Special cases
Not every image needs a description, and some need a different kind.
- Decorative images, such as background patterns, dividers or a purely visual flourish, should have an empty alt attribute, written as alt with two quotes and nothing between them. The screen reader then skips them. Leaving the attribute out entirely is not the same: some screen readers will then read the file name.
- Images that are links, such as a logo that links to the home page or a category tile, should describe where the link goes. For a logo, the shop name is often enough. Google also uses the alt text of a linked image in a similar way to the text of a normal link.
- Images that contain text, such as a banner with a sale message, need that text in the alt attribute, because a screen reader cannot read text in an image. Better still, put important text in the page itself.
- Charts and diagrams need a short alt text that says what they show, plus a fuller explanation in the text of the page if the details matter.
Finding images without alt text
On a small site you can check pages one by one, but on a shop with hundreds of products you need a list. A website crawler, such as Screaming Frog, can list every image without alt text and the pages it appears on. WordPress shows the alt text of each image in the media library, and many shop systems let you edit it per product photo.
Start with the images that matter most: the main photos of your best-selling products and categories, then the images in your most visited guides. Images used in many places, such as the logo, are worth fixing early because every page benefits.
Where the same image appears on several pages, the best alt text can differ per page, because the context differs. In practice, a good default description in the media library covers most cases.
A habit, not a project
The best way to keep alt text in order is to make it part of adding an image: no product goes live without a description of its photos. For the backlog of existing images, a few each week is enough to make steady progress, starting where the most visitors are.
Tools can now suggest alt text by analysing the image, which saves a lot of typing. Treat those suggestions as a first draft. Check that they are correct, that they describe the product as you would, and that they do not invent details that are not visible in the photo. A good way to check a description is to close your eyes while someone reads it to you, and ask whether you now know what the photo shows.