How to Write Alt Text for SEO: Rules, Length, and Real Examples

Short answer: what good alt text looks like

Alt text is the written description inside the alt attribute of an <img> tag. It is read aloud by screen readers, shown when an image fails to load, and used by search engines to understand what an image shows.

The rule that solves 90% of cases: describe the image’s purpose on that specific page, in plain language, in under 125 characters, and include your target keyword only if it genuinely belongs in the description.

A reliable formula:

Subject + key detail + context (+ keyword if natural)

  • Weak: alt="shoes"
  • Weak: alt="running shoes, best running shoes, cheap running shoes online"
  • Strong: alt="Blue Nike Pegasus 41 running shoe with worn outsole after 300 miles"

Everything below is the rule set we apply when auditing client sites: exact lengths, keyword placement, when the alt attribute should be empty, and how to fix thousands of images without writing each one by hand.

Why alt text still matters for rankings in 2026

Alt text is not a magic ranking lever, but it has four concrete effects:

  1. Google Images and AI surfaces: alt text is one of the clearest signals Google has for what an image depicts. Image packs, Discover, and AI-generated answers that cite visuals all pull from pages where image context is explicit.
  2. On-page topical clarity: alt text is indexable text. On image-heavy pages (product pages, galleries, recipe posts) it is often the only text describing the main content.
  3. Accessibility and legal risk: missing alt text is the single most common WCAG failure found in automated scans. Accessibility complaints and lawsuits target exactly this.
  4. Internal linking value: when an image is wrapped in a link, the alt text works like anchor text for the destination page.

What alt text will not do: it will not rescue a slow page, it will not rank a stock photo nobody searches for, and stuffing keywords into it will not move your rankings. Google treats keyword-stuffed alt attributes as spam signals.

image alt text

The 10 rules of writing alt text for SEO

Rule 1: Describe purpose, not pixels

Ask: why did we place this image here? If a chart exists to prove organic traffic grew, say that. Do not list axis colors.

  • Weak: “Graph with blue and orange lines on white background”
  • Strong: “Line chart showing organic traffic rising from 12k to 48k monthly sessions over 9 months”

Rule 2: Stay under 125 characters

Some screen readers truncate or pause awkwardly past roughly 125 characters, and long alt text is unpleasant to hear. Use this target table:

Image type Ideal length Hard max
Logo 2 to 5 words 40 characters
Product photo 8 to 15 words 125 characters
Blog illustration / screenshot 10 to 18 words 125 characters
Chart or graph 12 to 20 words + long description nearby 125 characters in alt
Icon with visible label Empty alt=""
Decorative background Empty alt=""

If you cannot describe the image in 125 characters, the extra detail belongs in a caption, a <figcaption>, or the body text, not the alt attribute.

Rule 3: Put the most specific words first

Screen reader users and crawlers both encounter the beginning of the string first. Lead with the subject.

  • Weak: “A photo taken in our Montreal studio of the new ergonomic chair”
  • Strong: “Ergonomic mesh office chair with lumbar support, side view”

Rule 4: Never start with “image of”, “photo of”, or “picture of”

Screen readers already announce “image”. Exception: when the medium matters (“Illustration of”, “Screenshot of”, “Line chart showing”, “Diagram of”, “Portrait of”). In those cases the format is part of the meaning.

Rule 5: Use the keyword once, and only where it fits

Alt text is a supporting signal, not a keyword slot. Our working guideline for a page targeting how to write alt text for seo:

  • Include the exact or partial keyword in the alt text of one image, ideally the main visual near the top of the page.
  • All other images get purely descriptive alt text.
  • Never repeat the same alt text across multiple images on the same page.

Example on this very page: alt="Alt text SEO checklist showing keyword placement and 125 character limit". It describes the graphic honestly and contains the topic words.

Rule 6: Write unique alt text for every image

Duplicate alt text across 40 product variants tells Google nothing. Differentiate by color, angle, model, or use case. For the wider picture, see How to write good alt text.

  • Weak (x5): “Leather tote bag”
  • Strong: “Tan leather tote bag front view”, “Tan leather tote bag interior with laptop sleeve”, “Tan leather tote bag worn on shoulder by model”

Rule 7: No punctuation games, no file names, no dimensions

Avoid alt="IMG_4821.jpg", alt="banner-1200x628", or alt text full of pipes and hyphens. Write it as a short, readable phrase. A trailing period is optional but it creates a natural pause in a screen reader.

Rule 8: Alt text is not the caption, the title, or the file name

Element Who sees it SEO weight What to write
Alt text Screen readers, crawlers, broken-image fallback Moderate Concise functional description
File name Crawlers, URL Low to moderate ergonomic-mesh-office-chair.jpg
Caption / figcaption All visitors Moderate (visible text) Extra context, source, data takeaway
Title attribute Mouse hover tooltip only Negligible Usually leave blank
Surrounding text All visitors High for image ranking Explain the image in the paragraph above or below

Rule 9: When the image is a link, describe the destination

If a thumbnail links to a product page, the alt text acts as anchor text. Describe where the click leads, not just what the picture shows.

  • Weak: alt="arrow icon"
  • Strong: alt="View all ergonomic office chairs"

If the link already contains visible anchor text next to the image, set the image alt to empty so the link is not announced twice.

Rule 10: Leave it empty when the image carries no information

An empty alt (alt="") is a deliberate instruction: “skip this, it adds nothing”. It is correct and recommended. Missing alt is not the same thing: when the attribute is absent, screen readers may read the file name out loud.

image alt text

When to use empty alt text: a decision tree

  1. Does the image convey information the text does not? If yes, write descriptive alt text.
  2. Is the image a link or a button? If yes, describe the action or destination.
  3. Does a visible caption or adjacent text already say the same thing? If yes, use alt="" to avoid duplication.
  4. Is it purely visual (divider, texture, gradient, spacer, flourish, stock background)? Use alt="", or better, move it to CSS as a background image.
  5. Is it an icon sitting next to its own label (for example a cart icon beside the word “Cart”)? Use alt="".

Important nuance for e-commerce: never empty the alt of the main product image. That image is the content.

Weak vs strong alt text: real examples by image type

Product photos

Image Weak alt text Strong alt text
Main shot of a coffee grinder “grinder” “Baratza Encore ESP burr coffee grinder in matte black, front view”
Close-up of the burrs “coffee grinder best price buy online” “Close-up of 40mm conical steel burrs inside the Encore ESP grinder”
Lifestyle shot in a kitchen “kitchen photo” “Coffee grinder on a wooden counter beside an espresso machine and scale”
Color swatch thumbnail “swatch1” “Select white colorway”

Charts, graphs, and data visuals

Alt text gives the takeaway. The full data belongs in the page text, a table, or a <figcaption>. How To Write Great ALT Text Descriptions covers this in more depth.

  • Weak: “SEO chart 2026”
  • Strong: “Bar chart: pages with alt text on all images get 23% more Google Images clicks”
  • Even better: that alt text plus a short paragraph or data table below the chart repeating the actual figures.

For complex figures, pair a brief alt with a visible long description:

<figure><img src="traffic-growth.png" alt="Line chart of organic sessions growing from 12k to 48k over 9 months"><figcaption>Organic sessions by month, January to September 2026. Growth accelerated after the image SEO audit in April.</figcaption></figure>

Logos

  • Header logo linking to the homepage: alt="Wicked SEO home" or simply alt="Wicked SEO"
  • Logo as pure branding, not a link: alt="Wicked SEO logo"
  • Client logo wall: alt="Shopify", alt="HubSpot" (brand name only, no “logo of the company we work with”)
  • Weak: alt="logo", alt="company logo seo agency best seo agency"

Decorative images

  • Abstract hero gradient: alt=""
  • Section divider swoosh: alt="" or CSS background
  • Stock photo of a generic team high-fiving, purely atmospheric: alt=""
  • Weak: “decorative image”, “spacer”, “blank”, “background design element 4”

Screenshots and UI

  • Weak: “Screaming Frog screenshot”
  • Strong: “Screaming Frog Images tab filtered to Missing Alt Text, showing 214 images”

Describe what the reader is supposed to notice in the screenshot, not the whole interface.

People, teams, and author photos

  • Weak: “team”
  • Strong: “Technical SEO consultant Marie Lavoie reviewing a crawl report on two monitors”
  • For author bylines: alt="Marie Lavoie" is enough.

Infographics

An infographic contains text that crawlers and screen readers cannot read. Do not try to compress 600 words into the alt attribute.

  • Alt: “Infographic: the 5 steps of an image SEO audit, detailed in the list below”
  • Then reproduce the infographic content as real HTML text on the page. This is the single biggest image SEO win most sites ignore.

Images of text (avoid them)

If an image contains a quote, a price, or a heading, repeat that text verbatim in the alt attribute, or replace the image with styled HTML text. Example: alt="Free shipping on orders over $75". Much the same conclusion turns up on monday.com.

image alt text

Keyword placement: a safe pattern

Here is how we distribute keywords across the images on a single optimized page:

Position on page Keyword usage Example
Featured / hero image Primary keyword, naturally placed “Alt text for SEO checklist on a laptop screen”
Supporting illustrations Secondary terms or variants “Empty alt attribute example in HTML code”
Screenshots Tool names and entities “Google Search Console image indexing report”
Decorative None alt=""

Red flags that trigger spam filters: the same keyword in 10+ alt attributes on one page, comma-separated keyword lists, location stuffing (“plumber Toronto plumber Ottawa plumber Montreal”), and alt text that does not match the visual at all.

How to audit existing images in bulk

Writing alt text for new images is easy. The real work is fixing the 2,000 images already on the site. Here is the workflow we use.

Step 1: Crawl and export

  1. Crawl the site with Screaming Frog, Sitebulb, Ahrefs Site Audit, or Semrush Site Audit.
  2. In Screaming Frog, open the Images tab and use the filters Missing Alt Text, Missing Alt Attribute, and Alt Text Over 100 Characters.
  3. Export to CSV. You now have every image URL plus the pages that host it.

Step 2: Prioritize instead of fixing everything

Not all images deserve the same effort. Sort your export in this order:

  1. Main product images and category thumbnails (revenue + Google Images traffic)
  2. Images on your top 20 landing pages by organic traffic or conversions
  3. Images inside links, buttons, and navigation (accessibility blockers)
  4. Blog illustrations, charts, and infographics
  5. Everything else, including theme assets that should be alt=""

Step 3: Detect the three failure patterns

Pattern How to spot it Fix
Empty where it should be descriptive Filter images on product and article templates with blank alt Write unique descriptions, start with top sellers
File name dumped into alt Search the export for “.jpg”, “IMG_”, “DSC”, “-scaled” Rewrite completely
Duplicated across many images Pivot table on the alt column to count repeats Differentiate by angle, color, variant

Step 4: Fix at the template level first

One template change can fix thousands of images. Examples:

  • WooCommerce / Shopify: set product gallery alt to a dynamic pattern such as Product name + variant + view, then hand-write the main image alt for top products.
  • Theme and page builder assets (dividers, shapes, loaders): force alt="" in the template.
  • Logos in header and footer: fix once in the template.
  • Blog archives and related post thumbnails: use the post title as alt, or empty if the title appears as visible text next to it.

Step 5: Fix the rest in WordPress efficiently

  • Media Library: switch to list view, click an image, fill the Alternative Text field. Note that editing it in the library does not retroactively change alt text already hard-coded into old posts, so verify after.
  • Use a bulk alt text plugin or a WP-CLI script to populate empty fields from the image title as a baseline, then refine the priority images by hand.
  • Re-crawl after deployment and confirm the Missing Alt Text count dropped.

Step 6: Use AI drafts, then review them

Vision models can draft alt text at scale and that is fine as a first pass. Two non-negotiable checks:

  • AI describes what it sees, not why the image is on that page. Rewrite anything generic.
  • AI invents brand names, model numbers, and chart values. Verify every specific claim, especially on product and data images.

Step 7: Measure

  • Google Search Console: Performance report, filter Search type to Image. Track impressions and clicks before and after.
  • Accessibility scan: axe DevTools, WAVE, or Lighthouse. Target zero “images must have alternate text” violations.
  • Re-crawl monthly so new uploads do not silently reintroduce the problem.
image alt text

Common alt text mistakes that cost you traffic

  • Keyword stuffing. “seo agency, best seo agency, seo company near me” is spam, not a description.
  • Omitting the attribute entirely. Always include alt, even if empty.
  • Treating alt as the caption. Alt is for people who cannot see the image, captions are for everyone.
  • Writing alt text for CSS background images. They have no alt attribute. If an image is informative, use a real <img> tag.
  • Forgetting lazy-loaded and carousel images. Check the rendered HTML, not just the source.
  • Describing the same image identically on 20 pages. Adapt the description to the page context.
  • Ignoring SVG and icon fonts. Inline SVGs need role="img" plus <title> or aria-label, or aria-hidden="true" when decorative.
  • Letting the CMS auto-fill alt with the file name. “dsc-0043-1-scaled” helps nobody.

Copy-paste alt text templates

Use case Template
Product main image [Brand] [Model] [product type] in [color], [view]
Product detail Close-up of [feature] on the [product name]
Lifestyle / in-use [Person or hands] using [product] to [action] in [setting]
Chart [Chart type] showing [metric] [direction] from [A] to [B] over [period]
Screenshot [Tool] [screen name] showing [the element to notice]
Before / after Before and after of [subject]: [left state] versus [right state]
Team / portrait [Full name], [role], [activity if relevant]
Linked thumbnail [Action verb] [destination], for example “Read the image SEO checklist”
Decorative Empty string
image alt text

Quick quality checklist before you publish

  1. Every <img> has an alt attribute, descriptive or deliberately empty.
  2. No alt text exceeds 125 characters.
  3. No “image of” or “photo of” openers unless the medium matters.
  4. Target keyword appears once, in the most relevant image, and reads naturally.
  5. No two images on the page share the same alt text.
  6. Linked images describe the destination or action.
  7. Charts and infographics have their data repeated as real page text.
  8. File names are descriptive and hyphenated.
  9. A Lighthouse or WAVE scan returns zero alt text errors.

FAQ

Is alt text used for SEO?

Yes. Google uses alt text, along with the file name, caption, surrounding text, and structured data, to understand what an image shows. It directly affects Google Images visibility and contributes to the topical clarity of the page. It is a supporting signal, not a primary ranking factor, so treat it as part of a broader image SEO setup that includes compression, modern formats, descriptive file names, and an image sitemap.

What is an example of alt text?

For a photo of a product: alt="Tan leather tote bag with brass clasp, front view". For a chart: alt="Line chart showing organic sessions rising from 12k to 48k over nine months". For a decorative gradient: alt="".

How do you add alt text?

  • HTML: <img src="chair.jpg" alt="Ergonomic mesh office chair, side view">
  • WordPress: click the image in the editor, then fill the Alternative text field in the block settings, or edit it in the Media Library.
  • Shopify: Products, select the image, click Add alt text.
  • Webflow / Wix / Squarespace: select the image and look for the alt or “accessibility description” field in the settings panel.

What is the best alt text length?

Aim for 5 to 15 words and stay under 125 characters. Logos need only a few words. If you need more than 125 characters, move the extra detail into a caption or the body text.

Should alt text contain my keyword?

Only when the keyword honestly describes the image. One natural use per page is plenty. Forcing keywords into every alt attribute risks being treated as spam and makes the page unusable for screen reader users.

When should alt text be empty?

When the image is purely decorative, when it duplicates adjacent visible text, or when it is an icon next to its own label. Use alt="" so assistive technology skips it. Do not remove the attribute altogether.

What are the alt text best practices in 2026?

  1. Describe purpose over appearance.
  2. Keep it under 125 characters.
  3. One natural keyword use per page, maximum.
  4. Unique alt text for every image.
  5. Empty alt for decorative images.
  6. Repeat chart and infographic content as real HTML text so AI search and crawlers can read it.
  7. Use AI to draft at scale, but review for accuracy and page context.
  8. Re-crawl monthly to catch new uploads with missing alt.

Does alt text help with AI search and chatbots?

Indirectly, yes. AI systems rely heavily on text to interpret pages. Accurate alt text, strong captions, and data repeated as HTML text make your visual content machine-readable, which increases the chance your page is cited when an answer references an image, chart, or product photo.

Do I need alt text on every single image?

You need the alt attribute on every image. You do not need text inside it on every image. Informative images get a description, decorative images get an empty string. That distinction is the whole skill.

Need this done across thousands of images?

Image audits are repetitive, template-driven work where small decisions repeat across your entire catalog. If you want a crawl, a prioritized fix list, and template-level rules your team can apply going forward, get in touch with Wicked SEO and we will scope the audit for your site.