ONPAGE

Image Alt Text SEO: How to Write Alt Text That Improves Rankings and Accessibility

How to write image alt text for SEO: descriptive vs keyword-stuffed alt text, when to use empty alt, filename best practices, image search traffic, and CMS-specific alt text workflows.

Alt text is one of the oldest on-page SEO elements — and one of the most consistently misunderstood. Most guides either treat it as a keyword-stuffing opportunity ("always put your keyword in every alt text") or dismiss it entirely ("Google can see images now, alt text doesn't matter"). Neither is accurate.

This guide covers what alt text actually does for SEO, the rules for writing it correctly, when to leave it empty, and how to handle alt text across different content types and CMS platforms.

What image alt text does

The alt attribute on an <img> tag serves two distinct purposes:

Accessibility. Screen readers read alt text aloud to visually impaired users. This is the primary purpose alt text was designed for — not SEO. A screen reader encountering <img src="pricing.png" alt=""> announces "image" (useless) or skips it. An image with alt="Pricing table showing Pro plan at $24 per month and Agency plan at $89 per month" gives the user the information the image conveys. Alt text should describe what the image communicates, not just what it depicts.

Search engine indexing. Google cannot fully "see" images the way humans do. Computer vision has improved significantly, but Google still relies on alt text, surrounding text, and filename to understand image content and index it appropriately. Alt text is the primary signal Google uses to understand what an image shows, which affects: image search ranking (Google Images is a meaningful traffic source for many sites), the relevance signal the image contributes to the surrounding page, and the ability to serve the image as a visual result in AI Overviews and rich results.

These two purposes are not in conflict — well-written alt text that accurately describes an image for a screen reader user also provides the clearest signal to Google about what the image contains.

How to write alt text for SEO

Be descriptive of what the image actually shows. The most important rule: alt text should describe the specific content of the image, not just the page's topic. alt="SEO dashboard" tells Google the image is some kind of SEO dashboard. alt="DeepSEOAnalysis audit report showing a technical score of 84 out of 100 with structured data errors flagged" tells Google exactly what the image shows.

Include the target keyword naturally — don't force it. If your article is about "image alt text SEO" and the image is a screenshot of the Yoast SEO alt text field in WordPress, alt="WordPress image alt text field in Yoast SEO settings" naturally includes relevant terms. alt="image alt text SEO image alt text SEO" is keyword stuffing that Google recognises and discounts, and is meaningless to screen reader users.

Keep it concise. Screen readers announce alt text as part of their reading flow. Very long alt text (over 125 characters) disrupts the reading experience. Aim for one descriptive sentence that captures what the image shows. If the image is genuinely complex (a detailed infographic, a technical diagram), describe the key information rather than every detail — or include a longer text description in the surrounding content and use concise alt text.

Don't start with "Image of" or "Photo of." Google and screen readers already know it's an image from the <img> tag. alt="Photo of a person typing at a laptop" is redundant — write alt="Person writing SEO content at a laptop" instead.

Match alt text to the image's purpose on the page. The same product image might have different optimal alt text depending on context. On a product listing page: alt="Blue wireless headphones, front view". On a blog post comparing headphones: alt="Sony WH-1000XM5 noise cancelling headphones showing headband design". The image is the same; the alt text reflects how the image is being used.

When to use empty alt text

Empty alt text (alt="") is correct for decorative images that add no information content:

  • Background textures and patterns
  • Decorative dividers or flourishes
  • Icons that are already labelled by adjacent visible text
  • Stock photos used purely for visual interest that add no informational value

Using empty alt text on decorative images is better than filling them with keywords — it tells screen readers to skip the image (no useful information here) and tells Google the image is decorative. This is preferable to forcing keywords into an image that has no information relevance.

What you should NOT do: omit the alt attribute entirely. <img src="decoration.png"> (no alt attribute) causes screen readers to read the filename, which is typically uninterpretable noise. Always include alt="" (empty) for decorative images, and alt="description" for informative images.

Image filenames and SEO

The filename is an additional — lower-weight — signal Google uses to understand image content. Best practices:

  • Use descriptive, hyphenated filenames: seo-audit-dashboard.png not IMG_4839.png
  • Align filenames with alt text: if alt="technical SEO audit results dashboard", the filename technical-seo-audit-dashboard.png reinforces the signal
  • Use lowercase only — some servers are case-sensitive, and Dashboard.PNG vs dashboard.png can produce 404s for links that reference one case but the file uses the other
  • Keep filenames reasonably concise — very long filenames don't provide proportionally more signal

Filename alone is a weak signal; the alt text carries more weight. But consistent alignment between filename and alt text is better than mismatched or generic filenames.

Alt text for different image types

Product images (e-commerce)

Product images should include: product name, key distinguishing attribute (colour, size, material), and orientation if relevant (front view, side view, detail shot). alt="Red leather women's wallet, bifold, front view" is better than alt="wallet" or alt="leather wallet front view product image buy now".

For image variants (colour swatches, size comparison shots), each variant should have distinct alt text reflecting what that specific image shows.

Blog post images

Blog images typically illustrate a concept, show a tool's interface, or visualise data. Describe the concept being illustrated: alt="Internal link structure diagram showing hub page linking to five spoke pages" rather than alt="internal linking SEO diagram".

Infographics

Infographics compress a lot of information into one image. The alt text should capture the primary insight or topic: alt="Infographic: Core Web Vitals thresholds — LCP under 2.5 seconds, CLS under 0.1, INP under 200 milliseconds". For complex infographics, consider placing a text version of the data in the surrounding content so the information is accessible to search engines (and screen readers) without depending on the image at all.

Logos

Site logo alt text should be the company or site name: alt="DeepSEOAnalysis". Avoid keyword-stuffing the logo alt text — alt="free SEO audit tool no signup AI visibility score" on the site logo is a known spam pattern that Google discounts.

Screenshots of software UI

Describe what the screenshot shows and its context: alt="Google Search Console Coverage report showing 1,247 indexed pages and 43 excluded pages" rather than alt="Google Search Console screenshot".

Image search as an organic traffic source

Google Images is a meaningful secondary traffic channel for sites with informative, properly attributed images. For image search to send traffic, the images need: descriptive alt text (the primary signal for image subject matter), informative surrounding text (the page context matters — an image on a well-structured article about the topic ranks better than the same image on a thin page), good image quality (Google can detect blurry or low-resolution images), and proper canonical tags on the page (duplicate images across pages may not rank as well as the canonical version).

For sites where visual content is core to the value proposition (recipe sites, product sites, design galleries, tutorial sites), investing in image SEO — systematic alt text, descriptive filenames, appropriate structured data (Recipe, Product, ImageObject) — can generate meaningful incremental organic traffic.

CMS-specific alt text workflows

WordPress

WordPress's media library has an "Alt Text" field for every uploaded image. The alt text set in the media library becomes the default when that image is inserted into a post. However, this default can be overridden per-insertion in the block editor. For pages built with Gutenberg blocks, the alt text field appears in the right-hand sidebar when an image block is selected.

Common WordPress alt text error: relying on the caption field instead of the alt text field. Captions are visible text below the image; alt text is the hidden accessibility and SEO attribute. They serve different purposes.

For programmatic image insertion in WordPress (gallery blocks, plugin-generated images, WooCommerce product images), alt text must be set at the attachment level in the media library — it won't propagate if not set there.

Shopify

In Shopify, product image alt text is set in the product editor: Products → select product → click image → Edit alt text. Collection image alt text is set similarly in the Collections editor. For blog posts, alt text is set when inserting images into the blog post content editor.

Common Shopify alt text gap: default Shopify themes render product images with the product handle as the alt text (e.g., alt="blue-wireless-headphones") if no alt text is set. This is better than empty, but not as descriptive as a properly written alt text including the product name and key attribute.

Next.js

In Next.js, the <Image /> component from next/image requires an alt prop — it will throw a build error if alt is omitted. This makes accidental omission less likely than in vanilla HTML, but it doesn't ensure quality alt text. Teams commonly use alt={product.name} which may produce generic alt text like "Product 47" if the data isn't structured with descriptive names.

Headless CMS (Contentful, Sanity, Storyblok)

In headless setups, alt text is typically a separate field on the image content type. The risk: if the frontend template pulls the image URL but doesn't query or render the alt field, all images will have empty or missing alt text even though the alt text data exists in the CMS. Audit the rendered HTML rather than the CMS data model to verify alt text is being served.

Common alt text mistakes

Keyword stuffing. alt="SEO audit tool free SEO audit AI visibility SEO checker" is recognisably a manipulation attempt, not a description. Google's quality systems identify this pattern.

Generic alt text at scale. E-commerce sites with thousands of product images often use the product SKU or handle as alt text (alt="SKU-4829") rather than descriptive text. At scale, this is a significant image search opportunity gap.

Alt text that describes the image format, not the content. alt="PNG file" or alt="landscape image" describes the technical format or orientation — not what the image shows.

Missing alt text on linked images. An image that is wrapped in an anchor tag (<a href="..."><img src="..."></a>) without alt text is particularly problematic for accessibility: a screen reader cannot tell the user what the link does because it has no text label. Google also uses anchor text (including image alt text on linked images) as context for the link destination.

FAQ

Does Google read image alt text for ranking?

Yes — alt text is a confirmed ranking signal for image search and contributes to page-level relevance for the surrounding topic. For standard web search rankings, alt text is a relatively low-weight signal compared to body text, title tags, and headings. However, well-written alt text consistently throughout a site (rather than missing or generic alt text) is part of a well-optimised page that signals thoroughness and care about content quality. The main direct SEO value of alt text is in image search visibility.

Can I use the same alt text on multiple images?

Not if the images are different. Identical alt text across different images signals either carelessness or keyword stuffing. If multiple images show the same thing (e.g., a product from different angles), the alt text should reflect the specific angle: alt="Blue wireless headphones, left side view" vs alt="Blue wireless headphones, right side view". Google can detect duplicate alt text patterns.

Should alt text always include the target keyword for the page?

Not necessarily. Alt text should describe what the image shows. If that description naturally includes the page's target keyword, that's appropriate. If forcing the keyword into the alt text produces a description that doesn't match what the image shows, don't include it. The SEO risk of inaccurate or keyword-stuffed alt text (quality signal penalty) exceeds the benefit of keyword repetition.

How many words should alt text be?

Most alt text should be 5–15 words — enough to describe the image clearly, short enough not to disrupt screen reader flow. Some images warrant longer descriptions (a complex chart, a detailed diagram). In those cases, use concise alt text for the core subject and provide a full text description in the surrounding content or a <figure><figcaption> element. The 125-character guideline (approximately 20 words) comes from historical screen reader limitations, but most modern screen readers handle longer alt text — the practical limit is what can be described concisely.

Run DeepSEOAnalysis on your own site.

Free, no signup. Technical SEO, Core Web Vitals, structured data, and AI visibility in one report.

Run a free audit →