Image Alt Text in WordPress: How to Write It for SEO and Accessibility

How to write image alt text in WordPress for people first: good and bad examples per image type, where to add it, bulk fixes, AI drafts, and what Yoast's new checks flag.

A sunset field photo beside a weak alt text example crossed out and a better one: Wheat field at sunset with low hills behind

Alt text is a short written description of an image, stored in the image’s alt attribute. Write it for a person who cannot see the picture: say what the image shows or does on that page, put the most important detail first, and keep it brief. If an image is only decoration, leave the alt text empty on purpose. Do not stuff it with keywords, and do not start with “image of”. SEO plugins now check for exactly these mistakes, so getting it right helps accessibility and your SEO score at the same time.

This guide is for site owners, bloggers and shop owners who have a Media Library full of images with no alt text, or with alt text like “IMG_4471” or “shoes best price buy now”. It covers what alt text is for, how to write it, good and bad examples for six kinds of image, where to type it in WordPress, how to fix hundreds of old images without losing a weekend, how to use AI-written alt text safely, and what the accessibility rules actually require. Facts about WordPress, Yoast and the W3C come from their own pages, which we read between 27 and 29 November 2026.


What is alt text and why does WordPress ask for it?

Alt text, short for alternative text, is a text version of an image. It does three jobs.

  1. It lets people who use screen readers know what the image is. A screen reader reads the page aloud. When it reaches an image, it reads the alt text. With no alt text, the person hears nothing useful, or hears a file name.
  2. It shows in place of the image when the image does not load. A slow connection, a blocked image or a broken link all fall back to the alt text.
  3. It tells search engines what the image is. The W3C’s images tutorial says accessible images can also help search engine indexing. It is a side effect of writing for people, not a trick.

The W3C, which publishes the web accessibility rules, says the right text “needs to be determined by the author, depending on the usage, context, and content of an image.” Its own example: a photo of a bird may need only a short description on a parks website, but more detail on a website about birds. The same photo can need different alt text on different pages. That is why no tool can fully do this for you, and why the advice below is about purpose, not formulas.

Is alt text a legal requirement?

Under the Web Content Accessibility Guidelines (WCAG), success criterion 1.1.1 “Non-text Content” is a Level A requirement, the most basic level. It says that all non-text content shown to the user needs a text alternative that serves the equivalent purpose, with a short list of exceptions: controls and inputs need a name that describes their purpose, and purely decorative content must be built so assistive technology can ignore it. We read the W3C’s Understanding Non-text Content page (marked updated 6 September 2026) on 29 November 2026. Whether WCAG is a legal duty for your site depends on where you are and what kind of organisation you run. This post is not legal advice. For the wider picture, our guide to WordPress accessibility and WCAG 2.2 covers the checks beyond images.


How do you write good alt text?

The W3C’s “Tips and Tricks” page for images (last updated 16 July 2024) gives four rules. They are the best short guide there is.

Rule

What the W3C says

What it means for you

Be accurate and equivalent

Choose text that conveys the image’s purpose. Imagine reading the page aloud over the phone to someone who needs to understand it.

Say what the image adds to this page, not everything that is in it.

Be succinct

“The alt text should be the most concise description possible of the image’s purpose.”

Aim for a short phrase or one sentence. Move long explanations into the page text.

Put the most important information first

Aim to put the most important information at the beginning.

Start with the key subject, then add detail only if it matters.

Avoid redundancy

There is usually no need to include words like “image”, “icon” or “picture”.

The screen reader already announces that it is an image. Skip “image of”.

The phone test

Read your page aloud to a friend who cannot see the screen. When you reach a picture, say what you would naturally say. “Here is a photo of our shop front, blue door, open sign in the window.” That sentence is close to your alt text. If you would skip it because it adds nothing, the image is probably decorative.

Does the title attribute count?

No. WordPress’s own Image block documentation says many devices and browsers do not display the title attribute. Do not rely on it. Use the alt field.

How long should alt text be?

WCAG sets no character limit. The W3C page on non-text content distinguishes short and long alternatives but gives no number. Yoast’s new check, described in the next section, flags alt text under 10 characters or over 200. Treat that as a sanity range, not a target. Most good alt text is five to fifteen words.


What are Yoast’s new alt text checks, and why do they flag my images?

Yoast SEO version 28.9 added five image alt text assessments. The plugin’s changelog on WordPress.org dates the release 18 November 2026, and Yoast’s own announcement, titled “Catch weak alt text: five new assessments, fix with AI for stores, and more abilities”, lives at yoast.com/release-2026-11-17. We read both on 29 November 2026. Here is what each check looks for, as Yoast describes it.

Assessment

What triggers it

How to fix it

Non-descriptive alt text

File names, placeholders, numbers and generic labels such as “product image”

Describe what the image shows. “Blue ceramic mug with a chipped handle” instead of “product image”.

Redundant phrase in alt text

Alt text that opens with “Image of”, “Picture of” or similar

Delete the opening phrase and keep the rest.

Duplicate alt text

Images on the same page that share identical alt text

Give each image its own description of what is different about it.

Keyphrase stuffing in alt text

Alt text that overuses your focus keyphrase

Describe the image. Use the keyphrase only if it is a natural part of that description.

Alt text length

Alt text under 10 characters or over 200

Expand very short text. Cut or move very long text into the page.

Three details from the announcement matter if you use Yoast:

  • The assessments appear only when something needs attention. They have no green traffic light, so a clean result shows nothing.
  • They replace the older “Keyphrase in image alt attributes” assessment. That older check rewarded putting your keyphrase in alt text, which is part of why so many sites have stuffed alt text today.
  • All five are free in Yoast SEO. For keyphrase stuffing, Yoast says a paid plan also catches synonyms, word forms and related keyphrases.

On the AI side, Yoast says “Fix with AI” on each alt text assessment is available in Yoast WooCommerce SEO (version 17.1) and Yoast SEO AI+, and that you review every suggestion before it saves. The announcement does not mention it for the standard free plugin, so if you only run free Yoast SEO, you fix alt text by hand or with another tool.

Do I need Yoast to follow this advice?

No. The rules are the same whatever plugin you use. Yoast is useful here because it now tells you which images need work. Other SEO plugins have their own checks. If yours says something different, trust the W3C rules above, because they describe what helps readers.


What does good and bad alt text look like for each kind of image?

The W3C’s image tutorials sort images by purpose. The type decides the alt text, not the subject of the photo. Here is the short version, based on the W3C’s alt decision tree.

Image type

What the alt text should do

Informative (photo or simple graphic that adds meaning)

A brief description that conveys the meaning

Decorative (adds nothing)

Empty alt: alt=""

Functional (inside a link or button)

Describe the destination or action, not the picture

Image of text

The same words as in the image, when the text is not already on the page

Complex (chart, graph, diagram)

A short description, with the full information elsewhere on the page

Now six real situations.

A product photo

The photo exists to help a buyer decide. Describe the product as a buyer needs to know it: what it is, and the detail that tells it apart from the one next to it.

  • Bad: product image, IMG_2231.jpg, or buy running shoes online best price
  • Good: Women's trail running shoe in forest green, side view

On a shop with several photos of the same item, give each its own angle or detail: “front view”, “sole close-up”, “worn on foot”. Identical alt text across a gallery is what Yoast’s duplicate check flags. If the product name and price are already in text beside the image, you do not need to repeat them.

A decorative image

A divider line, a background swirl, a stock photo of a smiling person that says nothing about your content. WCAG says purely decorative content must be implemented so assistive technology can ignore it. Putting alt text on it just distracts people using screen readers. The W3C’s recommended method is an empty alt attribute.

  • Bad: decorative swirl
  • Good: alt="", set with the “Mark as decorative” option described below

An empty alt is not the same as a missing alt. A missing attribute can leave a screen reader reading out the file name. An empty one tells it to skip the image. Be careful with the decorative label, though. If the image carries meaning, such as a photo of the person the page is about, it is not decorative.

A chart or graph

A chart holds data. A short alt cannot carry all of it. The W3C’s approach for complex images is to give a short description and put the full information elsewhere on the page, ideally as a table. WCAG’s own chart example adds that where possible and practical, the actual data is provided in a table.

  • Bad: chart
  • Good alt: Bar chart of monthly visitors, rising from 1,200 in January to 3,400 in June. Full figures in the table below.

Then add the table. It also helps sighted readers who want exact numbers.

A screenshot

Screenshots are common in tutorials. The W3C has no separate rule for them, so use the purpose test: what does the reader need from this picture? Describe what it shows, and put the steps in the text. A screenshot of a settings screen where you tell the reader to click a button should name that screen and the button.

  • Bad: screenshot or WordPress settings
  • Good: WordPress Settings > Reading screen with the "Discourage search engines" box unticked

If the screenshot contains text the reader must read, make sure those words also appear in the page text. Our own practice is to describe the screen and repeat the key instruction in a sentence above the image.

A logo

It depends on where the logo is. The W3C’s page on functional images gives two cases. If the logo is a link to the home page and is the only link content, use alt text that names the destination, such as “W3C home”, because the image’s job is to link. If the logo sits beside link text that already says where it goes, use an empty alt to avoid repetition. The page does not cover a plain, unlinked logo. For that, a sensible choice is the company name, for example “Acme Plumbing”.

A banner or image with text in it

The W3C’s tutorial advises avoiding text in images unless it is a logo. If you do use one, the alt text should contain the same words as the image.

  • Bad: sale banner
  • Good: Summer sale: 50% off all shoes until 31 July

Better still, put the offer in real text on the page, so everyone can read it, translate it and search it, and use the image only for looks with an empty alt.


Should you put your keyword in alt text?

Only when it is a natural part of an honest description. If the image is a photo of a “wordpress image alt text” settings screen and you describe that screen, the words appear by themselves. If you add them to every image on the page, you have written for a search engine, and you have made the experience worse for a screen reader user who hears the same phrase six times.

Yoast’s keyphrase stuffing check exists for this reason. The older Yoast assessment pushed people to include the keyphrase, and the new set replaces it. Treat this as a signal that search tools are catching up with what accessibility guidance has said for years: describe the image, not the keyword.

A simple test: delete the keyword from your alt text. If the description still makes sense and helps, keep it deleted. If it now says nothing, the image probably needs a better description or is decorative.


Where do you add alt text in WordPress?

There are two main places. They behave differently, and that trips people up.

In the block editor (per image, per page)

WordPress’s Image block documentation (last updated 22 October 2026) describes the steps.

  1. Open the post or page and click the Image block.
  2. Open the Settings sidebar, then the Content tab.
  3. Type your description in the Alternative text field. A link beside it, “Describe the purpose of the image”, opens the W3C decision tree.
  4. If the image is purely decoration, tick Mark as decorative instead.

You can also click Crop in the block toolbar, open the Media Editor, and pick the Details tab. It has an alt text field and tells you to leave it empty if the image is decorative. If you are new to the editor, our beginner’s guide to the WordPress block editor shows where everything sits.

The documentation is clear on one point. If you add alt text in the block settings, that edit applies only to the image on that specific page or post.

In the Media Library (the default for every future use)

Go to Media then Library, click an image, and fill in the Alt Text field in the Attachment Details panel. WordPress’s Media Library documentation (last updated 22 October 2026) says this field is for image files only and is used for accessibility. The Image block documentation says alt text added in the Media Library sets the default when you insert that image elsewhere.

So which one should you fill? Fill the Media Library field with a general description of the image, then override it in the block when this page needs a different one. The same photo of a mug on a product page and on a “gift ideas” page may need different words.


How do you fix hundreds of old images without losing a weekend?

WordPress does not have a built-in bulk alt text editor. Its Media Library documentation says the only bulk action there is Delete Permanently. So you need a plan, not a button. Do this in order.

Step 1: Fix the images that matter most

You do not need all 2,000 images done today. Start with the pages that get the most visitors and the images that carry meaning: product photos, charts, screenshots in tutorials and photos of people. Check your analytics for the top twenty pages and work through those.

Step 2: Find the images with no alt text

Your options, from simplest to most technical:

  • Your SEO plugin. Yoast’s new assessments show up in the editor of each post. They flag weak alt text one post at a time as you open it. Yoast also says its Bulk Editor has a “Needs improvement” filter that can find products by issue, in the WooCommerce SEO plugin.
  • A browser extension or accessibility checker. Free scanners list the images on a page that have a missing or empty alt. Run one on your top pages.
  • A database query, for a developer or a confident owner with a backup. WordPress stores alt text in a meta field named _wp_attachment_image_alt. With WP-CLI, this lists up to fifty images with no alt text. Check your table prefix first, because it may not be wp_.
wp db query "SELECT p.ID, p.post_title FROM wp_posts p LEFT JOIN wp_postmeta m ON m.post_id = p.ID AND m.meta_key = '_wp_attachment_image_alt' WHERE p.post_type = 'attachment' AND p.post_mime_type LIKE 'image/%' AND (m.meta_value IS NULL OR m.meta_value = '') LIMIT 50"

This only reads data. It changes nothing. On a site with thousands of images the limit keeps the query quick, and you can step through results in pages.

Step 3: Decide the type, then write

For each image, decide which of the five types it is. Decorative ones get an empty alt. The others get a short description. Work in batches of twenty with a spreadsheet: file name, page, type, alt text. It is faster than editing one at a time and gives you a record.

Step 4: Check the result

Open the page and run your checker again. Look at the front end, because an alt text set in a block can override the Media Library one, and the page is what visitors get.

Step 5: Make it a habit

Add alt text at upload time. It takes ten seconds when the image is fresh in your mind and thirty minutes a year later. If several people add content to your site, put a line in your publishing checklist. Our WordPress site readiness checklist is a good place to add it.


Is AI-generated alt text good enough to use?

It is a good first draft and a poor final answer. AI can look at an image and describe what it sees, which saves a lot of time on a large backlog. What it cannot know is why the image is on your page, and purpose is the whole point of alt text.

What AI is good at

  • Describing plain objects, scenes and people in a neutral way.
  • Producing a first draft for hundreds of images so you only edit instead of write.
  • Reading text inside an image.

Where AI goes wrong

  • It describes the picture, not the purpose. A photo of your team at a conference might come back as “five people standing in a room”. The useful alt text is “The Acme team at WordCamp, 2026”.
  • It cannot tell decorative from meaningful. It will happily describe a divider line.
  • It misses names, brands and context that only you know.
  • It can get facts wrong, such as reading a number on a chart incorrectly.
  • It is often too long, and long text is what Yoast’s length check flags.

Tools you may already have access to

The official WordPress AI plugin (version 1.5.0, last updated 30 October 2026, with more than 70,000 active installations when we checked) lists an Alt Text Generation feature that generates descriptive alt text for images. It requires WordPress 7.0.3 or higher. The release notes for version 1.4.0 say the feature integrates with the Image block’s decorative-image setting, so images you have marked decorative are excluded from suggestions. That is a sensible design, because it keeps you in charge of the decorative decision. As noted above, Yoast’s WooCommerce SEO and Yoast SEO AI+ offer “Fix with AI” for flagged alt text, with every suggestion reviewed before saving.

Many other plugins offer similar buttons. Whatever you pick, check what data it sends, to whom, and whether you need your own account with a provider. Our post on how AI features can quietly make a mess of a WordPress site lists the questions to ask before you switch one on.

The review step, every time

Use AI to draft and a person to approve. For every suggestion:

  1. Is it true? Compare it with the image.
  2. Does it say why the image is here? Add the purpose if it does not.
  3. Does it start with “image of” or “picture of”? Delete that.
  4. Is it under about 150 characters? Shorten it if it is not.
  5. Is the image decorative? If so, clear the text and mark it decorative.
  6. Does another image on the page have identical text? Change one.

Do the first twenty by hand while you watch what the tool gets wrong. It tells you how much review the rest needs.


What do the accessibility rules say about images, in plain words?

Four ideas cover most of it. All come from the W3C’s Web Content Accessibility Guidelines pages.

  1. Every image that carries information needs a text version that does the same job. That is success criterion 1.1.1, Level A.
  2. Decoration should be invisible to assistive technology. The WCAG guidance says text on decorative images distracts people using screen readers, and recommends an empty alt for those.
  3. Controls need a name that says what they do. An icon button for search should be named “Search”, not “magnifying glass”. The W3C’s functional images page says to describe the destination or action, not the picture.
  4. Complex images need more than a short alt. WCAG’s situation for a chart or diagram requires a short alternative plus a longer one, often the data in a table near the image.

Meeting these will not make your whole site accessible. Contrast, headings, keyboard use and form labels matter too, and our guide to making a WordPress site WCAG compliant goes through them. It is a good start, and images are where many sites fail first because the fix is visible in the page source and easy to check.

There is also a second payoff. Assistive tools and AI assistants read the same description of your page. We wrote about this in how your accessibility work now does two jobs.


What are the most common alt text mistakes?

Mistake

Example

Fix

Leaving it empty on an informative image

alt="" on a product photo

Describe the product

Using the file name

DSC_0042.jpg

Describe what is shown

Starting with “image of”

Image of a red bicycle

Red bicycle leaning against a brick wall

Stuffing keywords

wordpress seo plugin best wordpress seo plugin 2026

Describe the image honestly

Same text on every image

Ten gallery photos all called “Our work”

One description per image

Writing a paragraph

250 characters of detail

Short alt, detail in the page text

Describing decoration

blue wavy line

Mark as decorative

Skipping the function on a linked image

A magnifying glass icon with magnifying glass

Search

Putting key text only in an image

Prices inside a banner

Put the text on the page too

Large images also hurt speed, which is a different problem with the same cause: images added without thought. If your Media Library needs a clean-up, read our guide on compressing WordPress images for faster pages alongside this one, and fix both in one pass.


A ten-minute alt text routine for every new post

  1. Upload the image and type its alt text immediately in the Media Library field.
  2. Decide the type. If it is decoration, tick “Mark as decorative” in the block settings.
  3. Read each alt text aloud. If it sounds odd, rewrite it.
  4. Check that no two images on the page have identical alt text.
  5. If you use Yoast, open the post’s SEO panel and look for any alt text assessment that appears.
  6. For a chart, add the data as a table under it.
  7. Preview the page. If any image still has no text and is not decorative, fix it before you publish.

Frequently asked questions

What is the difference between alt text, a caption and a title?

Alt text is for people who cannot see the image and for when it fails to load. A caption is visible text under the image for everyone. WordPress’s documentation says the title attribute describes the image’s role but many devices and browsers do not display it. Use alt text for access, a caption for extra context shown to all, and ignore the title attribute for accessibility.

Do I need alt text on every image?

Every image should have a considered decision. Informative, functional and complex images need real alt text. Decorative images should have an empty alt on purpose. What you must avoid is an image with the wrong alt text or no decision at all.

Does alt text help my search ranking?

The W3C says accessible images can help search engine indexing, and image search relies on understanding what an image is. No official source promises a ranking boost from alt text alone, and we would not trust anyone who does. Write it for readers, and the search benefit follows from the same clarity.

How long should alt text be?

As short as it can be while still doing the job. WCAG sets no limit. Yoast’s check flags under 10 or over 200 characters. Most good alt text sits between five and fifteen words.

Should I put “image of” or “photo of” at the start?

No. Screen readers already announce an image, and the W3C advises leaving out words like “image”, “icon” or “picture”. Yoast now flags these openers too.

What about my featured image?

Treat it like any other image. If your theme shows it as a visible image at the top of the post, give it alt text that says what it shows. If the theme shows it only as a small decoration beside a title, an empty alt may be right. Look at the front end to decide.

Can I add the same alt text to all images in a gallery?

You can, but you should not. Yoast flags duplicate alt text on the same page, and it forces a screen reader user to hear the same line again and again. Describe what is different about each image.

Is AI alt text safe to publish without review?

We would not. Yoast’s own description of its AI feature says you review every suggestion before it saves. Use the six-point review above.


Sources

All pages read between 27 and 29 November 2026.

Varun Dubey

Written by

Varun Dubey

Varun Dubey runs Wbcom Designs, the WordPress studio he founded in India in 2009. He has spent sixteen years building on WordPress and BuddyPress, shipping client work and products such as Reign, BuddyX, Jetonomy and MediaVerse, and has been putting Claude and OpenAI workflows into production since 2023. He writes up what the studio learns along the way.

More about Varun

No comments yet