📋 Complete Guide

Alt Text Best Practices:
The Complete 2025 Guide

Everything you need to write perfect alt text — with 50+ real-world examples, common mistakes to avoid, and clear rules for accessibility, SEO, and every image type you'll encounter.

By IMGVO Team
Updated June 2025
12 min read
~2,800 words
1B+
People worldwide with a visual disability
125
Max characters before screen readers cut off
~55%
Of web images lack any alt text (WebAIM, 2024)

1. What Is Alt Text (and Why It Matters)

Alt text — short for alternative text — is the HTML alt attribute on an <img> tag. It's a text description of an image that serves three critical purposes:

<!-- The alt attribute goes inside the img tag --> <img src="golden-retriever-puppy.jpg" alt="Golden retriever puppy playing with a red ball on green grass" />

Despite being one of the simplest HTML attributes, alt text is consistently one of the most misused — or completely forgotten. A 2024 WebAIM accessibility audit found that roughly 55% of images on the top 1,000,000 websites had no alt text at all. This is both an accessibility failure and a missed SEO opportunity.

💡 Quick Note

The HTML attribute is spelled alt, not alt-text. "Alt text" is just the informal name used when talking about it. Don't add a hyphen in your code: alt="Your description here".


2. The 7 Golden Rules of Alt Text

Before diving into specific image types, here are the universal rules that apply to every image on every website:


3. Alt Text by Image Type — With Examples

Different types of images call for different alt text strategies. Here's exactly how to handle each one.

Product Images

For product images, include the product name, key attributes, and color/variant where visible. Think about what a customer would want to know if they couldn't see the image.

✗ Bad
alt="shoes"

No brand, no color, no type — completely useless.

✗ Also Bad
alt="image of nike shoes product photo"

Starts with "image of", and "product photo" is filler noise.

✓ Good
alt="Nike Air Max 270 in white and volt yellow, side view"

Brand, model, colors, and angle — exactly what a shopper needs.

✓ Also Good
alt="Nike Air Max 270 – volt yellow colorway"

Shorter version that still captures the essential details.

Informational Images (Charts, Graphs, Diagrams)

These require your most detailed alt text. Describe both what the chart shows AND its key takeaway — what conclusion a sighted person would draw from it.

✗ Bad
alt="bar chart"

What data? What does it show? Tells us nothing.

✓ Good
alt="Bar chart showing website traffic growth from 10K to 85K monthly visitors between January and December 2024"

Includes the subject, data range, and timeframe.

💡 Pro Tip — Complex Charts

For very complex charts or infographics, use alt for a brief summary and provide a full text description in the page content or a linked table. Alt text has a 125-character sweet spot — don't try to cram an entire dataset into it.

People and Portraits

Context determines the right approach. On a company team page, include the person's name and role. On a stock photo illustrating an article, describe what the person is doing.

✗ Bad (Team Page)
alt="person"

Completely anonymous — defeats the purpose.

✓ Good (Team Page)
alt="Sarah Chen, Head of Product at IMGVO"

Name + role = exactly what a team page visitor needs.

✗ Bad (Stock Photo)
alt="woman"

No context about what she's doing or why it's relevant.

✓ Good (Stock Photo)
alt="Woman reviewing compressed image files on a laptop screen"

Connects the image to the surrounding content topic.

Logos and Icons

For logos, use the company or brand name. For functional icons (buttons, navigation), describe the action. For purely decorative icons, use alt="".

✓ Logo
alt="IMGVO logo"

Simple, clean. The word "logo" is fine here.

✓ Functional Icon
alt="Download compressed image"

Describes the action the icon triggers, not the icon itself.

✗ Bad Icon Alt
alt="arrow icon"

"Arrow icon" describes the visual, not what it does.

✓ Decorative Icon
alt=""

Empty alt tells screen readers to skip a purely decorative icon.

Screenshots and UI Images

Describe both what the interface looks like and what it demonstrates in context.

✗ Bad
alt="screenshot"

Which software? What is it showing?

✓ Good
alt="IMGVO upload interface showing drag-and-drop zone with file size limit of 20MB"

Names the app, describes the UI element, notes the key info shown.

Linked Images (Images Inside Links)

When an image is wrapped in an anchor tag, the alt text must describe the link's destination — not just the image.

✗ Bad
alt="arrow"

Clicking this takes you somewhere — where?

✓ Good
alt="Go to IMGVO image compression tool"

Tells the user where the link goes before they click.


4. Alt Text for SEO: What Actually Works in 2025

Google's John Mueller has confirmed that alt text is one of the main ways Google understands images. Here's what the evidence shows about alt text and SEO:

How Google Uses Alt Text

Keyword Strategy for Alt Text

✓ Do This

Include your target keyword naturally if the image genuinely shows what the keyword describes. Example: if you're targeting "JPEG to PNG converter" and your screenshot shows that exact tool, write: alt="JPEG to PNG converter tool with drag-and-drop upload interface".

✗ Don't Do This

Don't keyword-stuff. alt="image compression compress images compress jpeg compress png image compressor tool" is spam and can actively hurt your SEO. Google's guidelines explicitly call this out.

The 1 Image, 1 Keyword Rule

Each image should target at most one keyword variation. Spread different relevant keywords across multiple images on the same page rather than piling them into a single alt text. This feels more natural to both algorithms and humans.

Alt Text vs. Image Filename

Your image filename also matters for SEO — Google reads it too. Use descriptive filenames separated by hyphens, not underscores.

SignalImpact on SEONotes
Alt textHighPrimary text signal for image content
Image filenameMediumUse hyphens, be descriptive
Surrounding textMediumParagraph text near image provides context
Image captionMediumOften the first text users read
Page title / H1MediumOverall page relevance signal
Image title attributeLowNot reliably read by assistive tech; minor SEO value

5. 10 Common Alt Text Mistakes to Avoid

Most alt text problems fall into a small number of patterns. Here are the ones you'll encounter most — and how to fix them.

  1. Omitting alt text entirely.
    <img src="photo.jpg"> — No alt attribute at all causes screen readers to read the filename (e.g., "photo-DSC-0031.jpg"). Always include an alt attribute, even if empty.
  2. Starting with "image of" or "photo of."
    Screen readers announce "graphic" or "image" before reading alt text. Adding "image of" is pure repetition. Just start with the subject.
  3. One-word descriptions.
    alt="dog" tells you almost nothing. What kind? What's it doing? What's the context? Aim for at least a short phrase.
  4. Keyword stuffing.
    Writing alt text purely for SEO with no regard for the actual image content is a violation of Google's guidelines and actively hurts accessibility.
  5. Using the filename as alt text.
    alt="IMG_4872.jpg" or alt="compress-image-tool-v2-final.png" is meaningless to both users and search engines.
  6. Duplicate alt text across multiple images.
    If you have a product with 5 images from different angles, each one needs unique alt text describing what angle or detail is shown.
  7. Missing alt text on icon-only buttons.
    A search button with only a magnifying glass icon and no alt text is completely inaccessible. Use aria-label or alt to describe the action.
  8. Adding alt text to CSS background images.
    CSS background-image properties have no alt attribute. If an image is content (not decoration), it should be in the HTML as an <img> tag.
  9. Over-describing decorative images.
    A purely decorative divider or background texture doesn't need a paragraph of description. Use alt="" and move on.
  10. Copying the image caption as alt text.
    If your image has a visible caption, don't repeat it verbatim in the alt text — screen reader users would hear the same description twice.

6. Decorative Images: When to Leave Alt Text Empty

Not every image needs a description. Some images add visual polish without conveying any information. For these, using an empty alt attribute is not just acceptable — it's the correct accessibility practice.

When to Use alt=""

Image TypeUse Empty Alt?Example
Decorative divider or spacer Yes A horizontal wavy line between sections
Background texture or pattern Yes A subtle noise texture on a card background
Purely aesthetic icon next to labeled text Yes A star icon next to the word "Rating"
Image already fully described by adjacent caption Yes Product image with a detailed visible caption below
Abstract background decoration Yes Gradient blob shapes in the hero section
Logo (standalone) No Should have alt="Brand Name logo"
Product image No Always needs a full description
Icon inside a link with no text label No Must describe the link destination
Complex icon that represents a concept Context Depends on whether surrounding text already explains it
⚠ Critical Distinction

There's a big difference between alt="" (empty string — correct for decorative images) and a missing alt attribute entirely (incorrect — causes screen readers to announce the filename). Always write alt="", never just skip the attribute.


7. Tools to Audit and Improve Your Alt Text

Manual review only gets you so far. These tools help you find and fix alt text issues at scale:

Accessibility Audit Tools

SEO Tools That Check Alt Text

Browser Developer Tools

The simplest audit: open Chrome DevTools, go to Elements, and click any image. Look at its alt attribute. For a quick full-page scan, open the Console and run:

// Find all images missing alt text on the current page document.querySelectorAll('img:not([alt])') .forEach(img => console.log('Missing alt:', img.src)); // Find all images with empty alt (decorative or incorrectly empty) document.querySelectorAll('img[alt=""]') .forEach(img => console.log('Empty alt:', img.src));

8. Frequently Asked Questions

Optimize Your Images Before Adding Alt Text

Properly sized, compressed images load faster and rank better alongside your alt text. Try IMGVO free — no signup needed.

Compress Images Free →

Related Guides

More resources to help you optimize your images for speed and search.