Image Alt Text: What It Is and How to Use It to Improve Your SEO

๐Ÿ“… June 5, 2025 โฑ๏ธ 7 min read ๐Ÿท๏ธ SEO

Most websites waste one of the easiest SEO opportunities: image alt text. Writing good alt texts can drive traffic from Google Images, improve accessibility, and reinforce your page's target keywords โ€” all with a change of fewer than 10 words per image.

Table of contents

  1. What is alt text?
  2. Why alt text matters for SEO
  3. How to write good alt text
  4. Real examples: bad vs good
  5. When NOT to use alt text
  6. How to add alt text in WordPress

What is alt text?

Alt text (alternative text) is an HTML attribute that describes the content of an image. It appears in the code like this:

<img src="running-shoes.webp" alt="Red Nike Air Zoom running shoes for women">

It was originally designed for two purposes:

Over time it also became an important SEO signal: Google uses alt text to understand what an image shows and decide when to display it in search results.

Why alt text matters for SEO

Google cannot "see" images the way a human does. Although its AI has improved significantly, alt text remains one of the primary signals it uses to index images. Good alt text benefits your SEO in three ways:

Fact: Google Images drives more than 22% of all web searches. Ignoring alt text means leaving a quarter of your visual traffic potential on the table.

How to write good alt text

Good alt text follows these rules:

  1. Describe what's in the image โ€” as if you were explaining it to someone over the phone
  2. Include the relevant keyword โ€” naturally, not forced
  3. Be specific but concise โ€” 5 to 15 words is sufficient
  4. Don't start with "Image of..." or "Photo of..." โ€” Google already knows it's an image
  5. Use the page context โ€” the alt text of a shoe image on a store should include the brand, model and color

Real examples: bad vs good

Example 1: product photo

โŒ Bad: alt="img001.jpg"

โŒ Bad: alt="shoe image"

โœ… Good: alt="Nike Air Max 270 white men's sneaker size 9"

Example 2: chart or screenshot

โŒ Bad: alt="screenshot"

โœ… Good: alt="Google Analytics dashboard showing a 40% increase in organic traffic"

Example 3: blog image

โŒ Bad: alt="photo"

โœ… Good: alt="Person compressing images on a laptop to optimize their website speed"

Example 4: company logo

โŒ Bad: alt="logo"

โœ… Good: alt="ComprimirPro logo"

Image typeWhat to include in alt text
E-commerce productBrand, model, color, relevant size or variant
Blog photographWhat it shows + article context
Chart / infographicWhat data or information it represents
Logo"[Company name] logo"
ScreenshotWhat the screen shows and what it's for
Person / portraitName if public, or description of the activity

When NOT to use alt text

Not all images need alt text. Purely decorative images (dividers, backgrounds, meaningless icons) should have an empty alt attribute:

<img src="decorative-divider.svg" alt="">

The empty attribute tells screen readers to skip that image, improving the user experience. What you should never do is omit the alt attribute entirely โ€” that generates accessibility errors and negative SEO signals.

Rule: if the image provides information to the user โ†’ write descriptive alt text. If it's purely decorative โ†’ alt="". Never omit the attribute.

How to add alt text in WordPress

In WordPress, you can add alt text in two ways:

When uploading a new image:

  1. Go to Media โ†’ Add New
  2. Select the image and wait for it to upload
  3. In the right panel you'll find the "Alternative Text" field
  4. Write your description and save

For images already uploaded:

  1. Go to Media โ†’ Library
  2. Click on the image you want to edit
  3. Edit the "Alternative Text" field in the right panel
  4. Save changes

Also optimize your image file sizes

Alt text improves your SEO, but a heavy image is still slow. Compress your images before uploading them to WordPress.

โšก Compress images for free

Related articles

โšก
ComprimirPro Team

Image optimization and web performance specialists. We share practical guides to make the web faster.

Ready to optimize your images?

Free, instant, private. No sign-up required.

โšก Use ComprimirPro now