Fixing Missing or Weak Image Alt Text for Search
Search engines cannot look at a photo the way a shopper does, so they lean on the words around it, and the alt attribute is the most direct of those words.
When alt text is missing, copied from a file name, repeated on every picture or crammed with keywords, your images are harder to find in Google Images and add little to the page they sit on. This guide takes the search angle: how alt text is read alongside other signals, how to find weak alt across a whole site, how to rewrite it, and how to check that image search traffic responds.
- What alt text does for search, and what it does not
- The signals read alongside alt text
- Finding weak alt text across a whole site
- Weak alt and better alt, side by side
- Images search engines cannot see
- The fix, step by step
- Where alt text is stored on common platforms
- Edge cases
- Keeping alt text good as the site grows
- Questions and answers
What alt text does for search, and what it does not
Google's own image guidance says it uses alt text, together with computer vision and the content of the page, to work out what an image is about. Bing describes a similar approach. That makes alt text one input among several rather than a magic ranking lever, but it is the input you control most directly and the one most often left blank or filled with rubbish.
For search, alt text does three useful jobs:
- It labels the image for image search. A product photo whose alt reads "Oak bedside
table with two drawers, natural finish" can match searches for exactly that. One whose alt reads
DSC_0412gives the search engine nothing to match. - It acts as anchor text when the image is a link. Google's documentation states that when an image is used as a link, its alt text is treated much like the anchor text of a text link. A row of category tiles with empty alt passes no description of the pages they point to.
- It supports the page's own topic. Accurate alt on the images of a page about garden sheds reinforces what that page covers. It will not rescue a thin page, but it removes a gap.
What alt text does not do is rank a page by repetition. Google's spam policies name keyword stuffing, and stuffing alt attributes is still stuffing. A long list of search phrases in an alt attribute is also a poor experience for anyone using a screen reader, which is the audience the attribute was designed for.
The signals read alongside alt text
Improving alt text in isolation leaves most of the value on the table. Search engines combine it with
several other clues, and when they agree the image is easier to understand and rank. When they contradict
each other, for example a file called blue-kettle.jpg with alt text about a toaster, the
signal is muddied.
| Signal | Where it lives | What good looks like |
|---|---|---|
| Alt attribute | alt="" on the <img> | A short, specific description of what the image shows in the context of this page. |
| File name | The image URL | oak-bedside-table-two-drawers.jpg rather
than IMG_20260311_1422.jpg. Hyphens between words. |
| Caption | <figcaption> or text directly under the image | Adds detail the alt leaves out. Captions are read by far more visitors than alt text. |
| Surrounding text | Headings and paragraphs near the image | The image sits next to the text that discusses it, not in an unrelated sidebar. |
| Page title and heading | <title> and <h1> | The page is about the same subject as its main images. |
| Structured data | JSON-LD image properties | Product, Article or Recipe markup points at the same main image the page shows. |
| Image sitemap | image:image entries in an XML sitemap | Useful where images are loaded in ways a crawler may miss. |
Of these, the file name is the one that is hardest to change later, because renaming a file changes its URL and any image search visibility built on the old URL starts again. Get names right at upload, and only rename existing images when they are genuinely meaningless.
Finding weak alt text across a whole site
Checking alt text page by page does not scale beyond a small brochure site. Run the Image Optimisation audit on your key templates to see the pattern, then use a crawler to collect every image and its alt attribute across the site into one spreadsheet. Most desktop crawlers, including Screaming Frog SEO Spider and Sitebulb, can export image URLs, the pages they appear on and their alt text.
Once it is in a spreadsheet, sort and filter for these patterns. Each points to a different cause and a different fix.
- No alt attribute at all on images that clearly carry content, such as product photos, team photos, diagrams and article images.
- Alt that is a file name or camera code: values matching
IMG_,DSC,PXL_,screenshot,.jpgor a string of digits. This usually means a CMS copied the file name into the alt field automatically. - The same alt on many different images: sort the alt column and count repeats. A shop where 300 photos all say "product image", or every gallery picture repeats the product name, is the common case.
- Boilerplate from the theme: alt values like "banner", "slide 1", "hero" or the site name on every page.
- Stuffed alt: very long values, repeated phrases, lists separated by commas or pipes, or town names tacked on for local search.
- Empty alt on content images:
alt=""is correct for decoration but wrong for a product shot, because it tells every reader, including search engines, that the image has nothing to say.
# Quick check on one page: images with no alt attribute
curl -s https://www.example.co.uk/shop/oak-bedside-table \
| grep -oiE '<img[^>]*>' | grep -viE 'alt=' | head
# Repeated alt values on the same page, most common first
curl -s https://www.example.co.uk/shop/oak-bedside-table \
| grep -oiE 'alt="[^"]*"' | sort | uniq -c | sort -rn | head
A shell check like this only sees the HTML the server sends. If the site builds its galleries with JavaScript, use a crawler with JavaScript rendering switched on, or the rendered HTML shown in Search Console's URL Inspection tool, to see what Google actually receives.
Weak alt and better alt, side by side
The aim is to describe what the image shows, in the words a person searching for that thing would use, without writing a keyword list. The examples below are from fictional businesses.
| Image | Weak alt | Better alt |
|---|---|---|
| Product photo, front view | IMG_4471 | Oak bedside table with two drawers and brass handles |
| Same product, drawer open | Oak bedside table | Oak bedside table with top drawer open showing dovetail joints |
| Recipe step photo | best easy lemon drizzle cake recipe UK | Lemon syrup being spooned over a warm loaf cake |
| Before and after job photo | roofer Leeds roofing Leeds roof repair | Slate roof after replacing broken tiles and repointing the ridge |
| Linked category tile | (empty) | Garden furniture |
| Chart in an article | chart | Bar chart of monthly orders, peaking in December |
Notice what the better versions have in common. They name the thing and the detail that makes this picture different from the one next to it. They use ordinary words, not search phrases. Where a place or brand genuinely appears in the picture it is fine to name it, but a location added only for search, such as a town name on a photo of a spanner, does not describe the image.
Length
There is no official character limit in HTML or in Google's guidance. In practice a phrase or one short sentence is enough for almost every image. Screen reader users hear the whole value, so long alt text becomes tedious, and anything more than a sentence usually belongs in a caption or the body copy where every visitor can read it.
Galleries of similar images
Product galleries are where duplicate alt text multiplies. Give each image the product name once and then the thing that differs: the angle, the colour, the detail shown, or the product in use. That gives image search several distinct, accurate descriptions rather than one repeated several times.
Images search engines cannot see
Perfect alt text does nothing for an image that search engines never find. Google's documentation
says it indexes images from HTML <img> elements, including those inside <picture>,
and does not index images set as CSS backgrounds. Several common patterns hide content images from image
search:
- Hero and banner images set with
background-image. Fine for decoration; a loss if the picture is the product or the work you want found. - Lazy-load scripts that keep the real address in
data-srcand put a blank placeholder insrc. Nativeloading="lazy"keeps the real address insrcand avoids this. - Galleries built entirely in JavaScript from a JSON feed, with no image elements in the server HTML. Google can render JavaScript, but relying on it adds delay and risk; server-rendered image elements are safer.
- Images blocked by robots.txt, often because an uploads or media folder was disallowed years ago.
- Images on a separate domain or CDN that blocks crawlers or requires cookies.
The fix, step by step
Step 1
Export every image and its alt from a crawl
Run the Image Optimisation audit on your main templates to see which kinds of page are affected, then crawl the whole site with a crawler that records images. Export one row per image per page, with the image URL, the page URL and the alt value. Add a column for page type, such as product, category, article or service, because the fix is usually made per template rather than per image.
Step 2
Group the problems by pattern
Filter the spreadsheet for missing alt, alt that looks like a file name or camera code, alt repeated across many images, theme boilerplate such as banner or slide, and long stuffed values. Count each group. A large group with one cause, like a theme that prints the product title on every gallery image, is fixed once in the template, while scattered one-off problems need editing in the media library or page by page.
Step 3
Put content images in real img elements
Check that the images you want found are <img> elements with their
real address in src in the HTML the server sends. Move important pictures out of CSS backgrounds,
replace script lazy-loading that uses data-src with native loading="lazy",
and confirm that robots.txt does not block your image folders. Alt text on an image that cannot be indexed
has no search value.
Step 4
Rewrite alt around what the picture shows
For each content image, write a short phrase naming what is shown and the detail that makes it different from the images near it, using the plain words a customer would search with. Keep it to about one sentence. Remove repeated keywords, lists of phrases and town names added only for search. For images used as links, describe the destination, because the alt acts as anchor text for that link.
Step 5
Back the alt up with file names and nearby text
For new uploads, use descriptive hyphenated file names that agree with the alt text, and place each image next to the heading or paragraph that discusses it. Add captions where they help readers. Make sure structured data such as Product or Article markup points to the same main image the page shows. Rename existing files only when the name is meaningless, and redirect or update every reference when you do.
Step 6
Fix alt where it is stored, not only on the page
Find out where each template gets its alt value. Some systems store alt once in the media library, some store it per insertion in the page content, and some themes ignore both and print a title. Fix the template so it reads the stored alt, update the media library entries, and switch off any setting that copies the file name into the alt field on upload.
Step 7
Measure the result in image search data
In Google Search Console, open the Performance report and set the search type to Image to see clicks and impressions from Google Images for your pages. Note the figures before you start, then compare over the following weeks, allowing time for pages to be recrawled. Re-run the crawl export to confirm the patterns you fixed have gone and no new ones have appeared.
Where alt text is stored on common platforms
Most alt problems at scale come from how the platform stores and outputs the value rather than from individual editors. Knowing where the value lives tells you where to fix it.
- WordPress. The media library holds an alt value for each attachment. In the block editor the alt is written into the post content when the image is inserted, so changing it later in the media library does not update posts that already use the image. Featured images and many theme and page-builder widgets read the media library value instead. Bulk fixes therefore need both places checked.
- Shopify. Product media has its own alt field in the product admin, and themes normally output it through Liquid. Images in theme sections take their alt from the file in the Files area. Some older themes print the product title instead of the stored alt, which produces identical alt across a gallery.
- Headless and custom systems. Check the content model. If the image field has no alt property, editors cannot add one, and the front end will fall back to a title or nothing. Add an alt field to the asset or the reference, and make it required for content images.
- Page builders. Image widgets often have their own alt box that overrides the library, or an option to use the title. Check the widget settings used most on your key templates.
Automatic alt text
Several platforms and plugins can now suggest alt text using image recognition. These suggestions are a reasonable starting point for large back catalogues, but they describe what is visible, not why it matters on this page. They cannot know that a photo shows your own bespoke kitchen rather than a kitchen, or that the important detail is the dovetail joint. Review suggestions before publishing, starting with the pages that earn the most traffic.
Edge cases
- Multilingual sites. Alt text should be translated with the page. An English alt on a French page is a mismatch for both readers and search engines. Check that the translation tool includes image attributes.
- Logos. A linked logo in the header needs alt that names the business, because it acts as a link, typically to the home page. There is no search benefit in adding a slogan or keywords to it.
- Text inside images. If a graphic contains words that matter, such as an offer or a quote, put those words in the alt and preferably in real HTML text too. Text baked into pixels is a weak signal even with character recognition.
- Stock photos. Alt text on a generic stock photo will not make it rank well, because the same picture appears on many other sites. Original photographs of your own products, premises and work have far more to gain from good alt text.
- SVG. An SVG loaded with an
<img>tag takes alt like any other image. Inline SVG does not have an alt attribute; if it carries meaning, give it a title or an accessible label instead.
Keeping alt text good as the site grows
- Make alt a required field for content images in the CMS or product import, with a clear way to mark a genuinely decorative image instead.
- Turn off file-name-to-alt copying in upload settings and plugins.
- Add alt columns to product imports so bulk uploads arrive with descriptions rather than blanks.
- Write a short house style: name the thing, then the distinguishing detail, one sentence, no keyword lists, translated with the page.
- Re-crawl quarterly and filter for the same patterns: missing, file-name, duplicate and overlong alt.
For how images fit into the rest of the audit, see the Image Optimisation Guide. For product galleries specifically, the product images guide covers variants and feeds.
1. Does alt text help images rank in Google Images?
Yes, it is one of the signals Google says it uses to understand an image, alongside computer vision, the file name, captions and the text of the page. On its own it will not make a weak image rank, but missing or meaningless alt removes a clear description that the search engine would otherwise have. The biggest gains usually come from original photographs of your own products or work, described accurately and placed next to text about the same subject.
2. Can I put keywords in my image alt text?
You can use the words people naturally use for what the picture shows, and that often includes your target phrase. What you should avoid is listing keywords, repeating the same phrase, or adding towns and services that are not in the image. Google treats keyword stuffing as spam wherever it appears, and screen reader users have to listen to every word. A short, accurate description almost always contains the right terms without any forcing.
3. Is duplicate alt text across product images a problem?
It is a missed opportunity rather than a penalty. When every image in a gallery has the same alt, search engines get one description for several different pictures, and screen reader users hear the same words repeatedly. Give each image the product name and then what is different about it, such as the angle, colour, detail or the product in use. Duplicate alt usually comes from a theme printing the product title, so fix the template first.
4. Does Google index images used as CSS backgrounds?
Google says it does not index images set with CSS, such as background-image, for image search. It indexes images from HTML img elements, including those inside a picture element. That is fine for purely decorative backgrounds, but if a hero or banner picture shows your product or your work and you want it found, output it as an img element with its real address in src and give it proper alt text.
5. How long should alt text be for SEO?
There is no official length in HTML or in Google's guidance, and no benefit in making it long. A short phrase or a single sentence is enough for almost every image: say what it is and the detail that matters on this page. Anything longer is usually better placed in a caption or the main text, where every visitor can read it. Very long alt values are also a common sign of keyword stuffing, which works against you.
6. Does the image title attribute matter for SEO?
The title attribute shows as a tooltip in some browsers when a mouse hovers over the image. Google's image guidance focuses on alt text, file names, captions and surrounding content, not the title attribute, so it is not worth spending time adding titles for search. It is also not a replacement for alt, because touch screen and keyboard users rarely see it and screen readers treat it inconsistently. Put your effort into the alt attribute instead.
7. How do I see how much traffic comes from Google Images?
Open the Performance report in Google Search Console and change the search type from Web to Image. That shows clicks, impressions and positions for searches made in Google Images, and you can filter by page to see which of your pages benefit. Record the figures before you rewrite alt text and file names, then compare the same period afterwards, allowing several weeks for pages to be recrawled and for changes to show.
8. Should I rename old image files to improve SEO?
Only when the existing names are meaningless and the images matter. Renaming a file changes its address, so any image search visibility built up on the old address starts again, and every page, feed and structured data reference must be updated. For established images with reasonable names, improving the alt text and nearby content is usually enough. For all new uploads, choose descriptive hyphenated names before uploading, which costs nothing and avoids the problem.
The Image Optimisation audit checks every image on your page for alt text as well as file size, format, dimensions, lazy-loading, layout shift and CDN delivery, and ranks its recommendations by their effect on loading and bandwidth.
Open Image Optimisation Fixes โ