2026-06-25 · 4 min read
Image SEO: alt text, filenames, and the parts that actually matter
What search engines can and cannot read from an image, how to write alt text that serves people first, and the technical attributes that affect ranking through page performance.
Search engines have become genuinely good at recognising image content, which has not made the surrounding text irrelevant. It has changed what that text is for: less a description a machine cannot otherwise obtain, more a set of signals about context, relevance and quality.
Most image SEO advice is a list of places to put keywords. The parts that actually move anything are narrower than that, and two of them are performance rather than text.
Alt text is for people first
The primary audience for alt text is someone using a screen reader. Writing for that audience produces text that works for search engines as a side effect; writing for search engines produces text that fails both.
A good alt attribute describes what is in the image, in the context of the page it sits on. The same photograph might warrant different alt text on a product page and in a blog post, because what matters about it differs.
<!-- Useless -->
<img src="img_4021.jpg" alt="image">
<!-- Keyword stuffing: helps nobody, and Google has ignored it for years -->
<img src="table.jpg" alt="oak dining table buy cheap furniture online shop best price">
<!-- Useful -->
<img src="oak-dining-table-side.jpg" alt="Oak dining table seen from the side, showing tapered legs">
Length: a sentence. If you need a paragraph, the information belongs in the page text where everyone can read it, with the image described more briefly.
When alt text should be empty
Decorative images — dividers, background textures, an icon next to a label that already says the same thing — should have alt="". Not a missing attribute, which makes screen readers announce the filename, but an explicitly empty one, which tells them to skip it.
This is a case where less markup is better markup, and where a well-meaning instinct to describe everything actively degrades the experience.
Filenames carry weight the file cannot
The filename becomes part of the URL, and URLs are one of the few things about an image that persist through being copied, re-hosted and shared. oak-dining-table-side-view.jpg is self-describing in a way that DSC_4821.jpg is not.
Practical rules: lowercase, hyphens rather than underscores or spaces, two to five descriptive words, no keyword stuffing. Rename in a batch before upload — most CMSs make renaming afterwards awkward or impossible without breaking links.
Captions are read more than alt text
A visible caption sits in the page content, is read by sighted users, and is indexed like any other text. It is a better place than alt text for information you want people to actually receive, because most people never encounter alt text at all.
Captions and alt text should not duplicate each other. The caption adds context; the alt describes the image for someone who cannot see it.
The technical parts that matter more than the text
Here is the uncomfortable part: for most sites, the biggest ranking impact from images is not editorial at all. It is that images are usually the heaviest thing on the page, and page experience is a ranking factor.
Dimensions on the element. Always set width and height attributes, or an equivalent aspect-ratio in CSS. Without them the browser does not know how much space to reserve, and the page reflows as images load. That is Cumulative Layout Shift, and it is measured.
<img src="harbour.webp" width="1600" height="1067" alt="Fishing boats moored at the harbour wall">
Lazy loading, applied carefully. loading="lazy" on below-the-fold images saves bandwidth. Applied to your hero image it actively harms you, because it delays the Largest Contentful Paint — usually the very image you just deferred. Above the fold: eager, and consider fetchpriority="high".
Responsive sources. A srcset that lets a phone download a 600-pixel file instead of a 1600-pixel one is worth more than any amount of alt text tuning.
File size. Covered elsewhere at length, but the summary applies here: resize to display dimensions first, compress second, and choose a modern format third.
Structured data, where it applies
Product, Recipe and Article schema all have image properties, and populating them makes your images eligible for rich results. This is worth doing for pages where those types genuinely apply and worth skipping otherwise — marking up a blog post as a Product because Products get rich results is the kind of thing that gets a site manual action.
An image sitemap is largely redundant for a small site whose images are in the HTML. It becomes useful when images are loaded by JavaScript or served from a separate domain.
What to do, in order
- Resize and compress properly. This is the highest-impact item and it is not text.
- Rename files descriptively before upload, in a batch.
- Write alt text for humans, empty for decorative images.
- Set width and height on every image element.
- Lazy-load below the fold, never above it.
- Add captions where they genuinely add context.
- Add structured data only where the schema type honestly describes the page.
Items one and four will do more for you than items three, six and seven combined — which is not an argument for skipping the text, but it is an argument against spending an afternoon on alt text while shipping 4000-pixel hero images.