WordPress: maintain alt text in the Media Library and Image block

Alt text conveys an image's meaning when it cannot be seen. Its context in the article matters. This guide covers the WordPress block editor; labels may vary by version.

Step by step

  1. Open the article and read the text around the image. Identify the extra information the image provides. Record the existing alt text so the change can be undone.
  2. Open Media → Library, select the image and enter a concise, factual description in Alternative Text. This supplies a default for new insertions, not a reliable retrospective correction of every existing use.
  3. Select the Image block in the article. Check its own alt text in the block settings and adapt it to this use. Save or update the article.
  4. Example: a screenshot explains a switch. Describe the relevant information, such as ‘Notifications for example.org are blocked’, rather than ‘Screenshot’ or a list of keywords.
  5. A purely decorative image adding no information needs empty alt text. A linked image without another meaningful link label instead needs its destination or function conveyed. Also provide important chart data in ordinary text or a table.

Check the result

Open the public page. Inspect the actual image's alt attribute in the browser inspector and, if possible, read the section with a screen reader. A filename, image title or visible caption does not replace alt text. Check other places using the same image too.

Undo and limitations

If the change is unsuitable, restore the recorded text in the affected Image block. Do not delete or replace the image file for this. Other editor or gallery blocks may store the text differently; the output HTML is what matters.

Source