/ โ† Image Optimisation Fixes / Image Alt Text
In this guide
  1. What alt text does for search, and what it does not
  2. The signals read alongside alt text
  3. Finding weak alt text across a whole site
  4. Weak alt and better alt, side by side
  5. Images search engines cannot see
  6. The fix, step by step
  7. Where alt text is stored on common platforms
  8. Edge cases
  9. Keeping alt text good as the site grows
  10. 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:

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.

๐Ÿ’ก This guide covers alt text from the search side. For the accessibility rules, including how screen readers treat missing and empty alt, see the separate guide on fixing missing or wrong alt text, and for when an image should have empty alt, the decorative images guide.

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.

SignalWhere it livesWhat good looks like
Alt attributealt="" on the <img>A short, specific description of what the image shows in the context of this page.
File nameThe image URLoak-bedside-table-two-drawers.jpg rather than IMG_20260311_1422.jpg. Hyphens between words.
Caption<figcaption> or text directly under the imageAdds detail the alt leaves out. Captions are read by far more visitors than alt text.
Surrounding textHeadings and paragraphs near the imageThe 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 dataJSON-LD image propertiesProduct, Article or Recipe markup points at the same main image the page shows.
Image sitemapimage:image entries in an XML sitemapUseful 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.

  1. No alt attribute at all on images that clearly carry content, such as product photos, team photos, diagrams and article images.
  2. Alt that is a file name or camera code: values matching IMG_, DSC, PXL_, screenshot, .jpg or a string of digits. This usually means a CMS copied the file name into the alt field automatically.
  3. 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.
  4. Boilerplate from the theme: alt values like "banner", "slide 1", "hero" or the site name on every page.
  5. Stuffed alt: very long values, repeated phrases, lists separated by commas or pipes, or town names tacked on for local search.
  6. 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.

ImageWeak altBetter alt
Product photo, front viewIMG_4471Oak bedside table with two drawers and brass handles
Same product, drawer openOak bedside tableOak bedside table with top drawer open showing dovetail joints
Recipe step photobest easy lemon drizzle cake recipe UKLemon syrup being spooned over a warm loaf cake
Before and after job photoroofer Leeds roofing Leeds roof repairSlate roof after replacing broken tiles and repointing the ridge
Linked category tile(empty)Garden furniture
Chart in an articlechartBar 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:

โš ๏ธ An image sitemap helps Google discover images, but it does not make a CSS background image eligible for image search in the way an img element is. Move important images into the HTML first.

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.

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

Keeping alt text good as the site grows

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.

Questions and answers

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.

Find weak alt text on your pages

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 โ†’
๐Ÿ’ฌ Got a problem?
Related Guides: All Image Optimisation Fixes  ·  Alt Text for Accessibility  ·  Decorative vs Content Images  ·  Product Image SEO  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.