WordPress

Last updated

How to Add Alt Text to Images in WordPress

Add alt text to images in WordPress through the block editor, the Media Library or the image HTML, and set it in Workover before you publish.

How to Add Alt Text to Images in WordPress

Alt text, often called “alt tags”, is the text description attached to an image. Screen readers read it aloud, browsers may show it when an image is not displayed, and Google uses it to understand what an image shows. It is also widely neglected: the WebAIM Million 2026 report found missing image alt text on 53.1% of the top one million home pages.

This guide shows three ways to add alt text to images in WordPress, and how to set it in Workover before you publish.

What is alt text?

Alt text is the value of an image’s HTML alt attribute:

<img src="image.jpg" alt="image description">

It serves two audiences:

  • People. Visually impaired readers using screen readers hear the alt text in place of the image. Text alternatives for images are required by success criterion 1.1.1 of the Web Content Accessibility Guidelines (WCAG).
  • Search engines. Google uses alt text, along with computer vision and the contents of the page, to understand what an image shows.

If an image fails to load, the browser may show its alt text instead, so readers still know what should be there:

A WordPress post where an image has failed to load, with the alt text "Prow of a sailing boat" shown in its place, outlined in red

For how alt text differs from the image title, see Image alt text vs image title in WordPress.

Method 1: Add alt text to an image in a post

Use this for images already in a post or page. The alt text you set here applies to this image in this post only.

  1. Open the post in the WordPress block editor.
  2. Click the image to select its Image block.
  3. In the Settings sidebar, on the Block tab, enter your description in the Alternative text field.
  4. Repeat for any other images in the post.
  5. Save the post. On a post that is already published, the button is Save.

Method 2: Add alt text in the Media Library

Use this to set alt text on an image file itself, either as you upload it or later.

  1. In your WordPress dashboard, go to Media > Library.
  2. To upload a new image, click Add Media File at the top of the library, then click Select Files and choose the image.
  3. Click the image in the library grid to open Attachment details.
  4. Enter your description in the Alternative Text field.
WordPress Attachment details window: an image of a sailing boat's prow on the left, and on the right the Alternative Text field, outlined in red, containing "The prow of a sailing boat", above the Title, Caption and Description fields
  1. Click outside the field. WordPress saves the change automatically and shows Saved.

When you next insert this image into a post, the block editor fills in its alt text from the library.

Warning: the library’s alt text is copied into a post only when you insert the image. Changing it in the Media Library later does not update images already in your posts. To fix those, edit each post as in Method 1.

The Title field in Attachment details names the file in your Media Library. It does not add a title attribute to the image in your posts.

Method 3: Edit the image HTML

If you prefer to work in HTML, you can edit a single block’s markup:

  1. Open the post in the block editor and select the image.
  2. In the block toolbar, click Options (the three dots) and choose Edit as HTML.
  3. Find the alt="" attribute and type your description between the quotes.
  4. Save the post.

Adding alt text in Workover

If you write in Workover and publish to WordPress, you can set alt text before the post goes live:

  1. In the Workover editor, select the image.
  2. Click Edit in the image toolbar. The Edit image dialog opens.
  3. Enter your description in Alt text. You can also change the image’s File name, which becomes its name in WordPress.
  4. Click Save.

When you push the document to WordPress, the alt text goes out with the image, and Workover uploads the image to your media library with that alt text the first time it pushes it to your site. This includes images you pasted in from a Google Doc: Workover copies them into its own storage when you paste them, and shows a message if one could not be copied. See Images and media and How to push a document to WordPress.

Best practices for writing alt text

  1. Be descriptive. Say what the image shows or why it is there. “A man walking a dog in the park” beats “man” or “dog”.
  2. Be concise. Typically only a few words are necessary, though a short sentence is sometimes appropriate.
  3. Use keywords sparingly. Include a keyword only where it fits the description naturally.
  4. Don’t start with “Image of” or “Picture of”. Screen readers already announce that it is a graphic.

Examples

  • Good: “Golden retriever playing fetch in a sunny park”. It is specific and clear.
  • Bad: “Dog”. It is too vague to be useful.
  • Worse: “Dog, dog food, dog toys, cheap dog toys, popular dog toys”. It is keyword stuffing that helps no reader, and Google warns it may cause your site to be seen as spam.

Conclusion

Alt text makes your images accessible to people using screen readers and helps search engines understand them. In WordPress, set it per image in the block editor, or on the file in the Media Library before you insert it. Once it is part of your routine, it takes seconds per image.

Stop pasting drafts into your CMS.

Write, review and publish in one place, then let Monitor watch every page after it goes live.