Home / Guides / Empty alt attribute

Guide

Missing or Empty Alt Attribute in WordPress: How to Fix the Warning

Lighthouse, WAVE or an SEO audit flagged your images. Here is what each message actually checks and how to clear it.

“Image elements do not have [alt] attributes” means Lighthouse found at least one <img> with no alt attribute at all. Images that WordPress core prints from the media library always carry one, even an empty one, so the culprit is usually a theme template, a Custom HTML block, a slider or a third-party widget. An empty alt (alt="") is a different case: Lighthouse accepts it, which is right for decorative images and wrong for informative ones.

Missing alt and empty alt are two different problems

A missing alt attribute means the <img> tag has no alt at all. Screen readers may then read out the file name or the image address, and Lighthouse, axe and WAVE all report a failure.

An empty alt attribute (alt="") is a deliberate signal: this image is decorative, skip it. Lighthouse and axe only check that the attribute exists, so an empty alt passes (an alt made of a single space does not). That is right for a divider or a background flourish. On a product photo, a chart or a portrait, it is a silent failure of WCAG criterion 1.1.1. The same goes for an image that is the only content of a link: with an empty alt, the link has no name.

WordPress adds to the confusion. When the Alternative text field of a media item is empty, core still prints alt="": your Lighthouse report stays clean while informative images say nothing. Across the 2,449 images of our benchmark (134 pages tested with our checker, all platforms), one in four had a missing or empty alt.

The warning you saw, tool by tool

Each tool words the warning its own way. Here is what each one checks and whether it accepts an empty alt.

The messageWho shows itWhat it checksAccepts an empty alt?
“Image elements do not have [alt] attributes”Lighthouse, PageSpeed Insights (Accessibility)An <img> with no alt attribute at allYes, it only checks that the attribute exists
“Images must have alternative text” (“alternate text” before axe 4.11)axe DevTools, Accessibility InsightsThe same rule as Lighthouse, which runs on axeYes
“Missing alternative text”, “Linked image missing alternative text”WAVEAn image with no text alternative, alone or inside a linkYes, listed as a feature (“Null or empty alternative text”)
“Missing Alt Attribute” and “Missing Alt Text”Screaming Frog SEO SpiderTwo filters: no alt attribute at all, or an alt attribute with no textNo, an empty alt lands in Missing Alt Text
“Missing alt text”Ahrefs Site AuditImages without alt text on crawled pagesIt used to count it as missing; since April 2026 decorative and tracking images are left out
“Images without alt attributes”Semrush Site Audit (warning)Images without alt attributes on crawled pagesNot documented
“Keyphrase in image alt attributes”Yoast SEOWhether your image alts contain the focus keyphrase: an SEO hint, not an accessibility testNot relevant
“Focus Keyword in Image Alt Attributes”Rank Math SEO, content analysis (the editor also shows “Add an image with your Focus Keyword as alt text.”)Whether your primary focus keyword, singular or plural, appears in the alt text of your images: an SEO hint, not an accessibility testNot relevant
“The images on this page are missing alt attributes”An older Yoast SEO message, retired by early 2019 and still searched todayImages without alt attributes on the analyzed pageNot relevant
“This image has an empty alt attribute; its file name is …”The WordPress block editor (Image block)Nothing: it is a placeholder the editor shows when the alt is empty, usually visible when the image fails to load. The published page gets alt=""Not relevant
“This image has been marked as decorative; its file name is …”The WordPress block editor (Image block, WordPress 7.1 and later)Nothing: it is a placeholder the editor shows for an image ticked as Mark as decorative. The published page gets an empty alt and role="none"Not relevant

Where images without an alt attribute come from in WordPress

The Lighthouse warning rarely comes from the media library. It usually comes from one of these.

Theme templates

A logo, a header image or an icon hard-coded in a template as a bare <img> tag. Fix it in the theme settings or a child theme, or ask the theme author.

Custom HTML and builder widgets

An <img> pasted into a Custom HTML block, an HTML widget of your page builder or a shortcode. A builder can only fill in the alt of images it generates itself.

Third-party widgets

Sliders, review badges, map embeds and other third-party widgets inject their own images. Look for the alt setting of the plugin, or report the issue to its author.

The free page checker

Paste a URL into the free alt tag checker to list up to 50 images of the page with their alt text and status, theme images included. It flags missing and empty alts together: to see which ones Lighthouse means, use the HTML snippet in its report.

25.2%

of the 2,449 images we checked have a missing or empty alt

63%

of the 134 pages tested had at least one image with a missing or empty alt

1.1.1

the WCAG criterion behind the accessibility warnings

2nd

most common WCAG failure on the top million home pages: missing alt text (WebAIM, 2026)

How to fix “Image elements do not have [alt] attributes”

From the warning to a clean report. Steps 3 and 4 depend on where the image comes from.

01

Open the failing elements

In Lighthouse or PageSpeed Insights, open the audit in the Accessibility section: it lists each failing element with its HTML. In WAVE, click the red icon next to the image.

02

Find out where the image comes from

Check the image’s class attribute. wp-image-123 means the image comes from the media library (ID 123). Anything else usually comes from the theme, a widget or a plugin.

03

Library images: write the alt, then update the post

Fill in the Alternative text field in Media › Library. Images inserted with the block editor keep the alt they had when they were inserted, so open the post, select the Image block and update its alt too (our guide to adding alt text in WordPress shows where). Featured images and Elementor image widgets read the library value, so they update on their own.

04

Theme and widget images: fix them at the source

Use the alt setting of the block or widget, the theme’s logo settings or a child theme. A purely decorative image gets alt="" on purpose (see our alt text examples).

05

Run the audit again

Lighthouse should now pass, which only proves that every image has an alt attribute. Check that the informative ones actually describe something: here is how to check if an image has alt text and read what it says.

Find every empty alt in your media library

Lighthouse will not tell you about the media library images that print an empty alt while carrying information. Filikod does: it lists every library image with a missing or empty alt, with the post it was uploaded to, so you describe it or switch it to Decorative on purpose.

Decorative images keep their empty alt and leave the score. You write the others from one screen, in bulk. Featured images and Elementor widgets pick up the new alt at once; images already placed with the Image block keep their own copy (see step 3).

Frequently asked questions

Lighthouse found at least one <img> on the page with no alt attribute. Open the audit in the Accessibility section to see which ones. On WordPress, look first at images printed by the theme, a Custom HTML block or a third-party widget: images that core prints from the media library always carry an alt attribute, even an empty one.

Not by itself. alt="" tells screen readers to skip a decorative image, and WCAG allows it. It is an error on an image that carries information, such as a product photo, a chart or a screenshot. Lighthouse cannot tell the difference: it only checks that the attribute exists.

Because they do not count the same thing. Lighthouse accepts an empty alt, while Screaming Frog reports it as Missing Alt Text. SEO crawlers also read the raw HTML, including images inside <noscript> such as the Meta Pixel, which a browser never displays.

Three usual reasons: the flagged image is not the media library one (theme, widget, HTML block), the post still holds the empty alt the Image block had when you inserted it (SEO crawlers flag that, Lighthouse does not) or a page cache serves the old HTML. Update the block, clear the cache and run the test again.

From the WordPress block editor. Since WordPress 5.0, the Image block uses that sentence as a placeholder alt inside the editor when the real alt is empty, and you usually see it when the image fails to load. The published page does not print it: it gets alt="". Fill in the alt in the block settings and the message goes away.

It is an older message of the Yoast SEO analysis, retired by early 2019 and still a common search. It meant that some images on the analyzed page had no alt attribute. Yoast now checks “Keyphrase in image alt attributes”, an SEO hint about your focus keyphrase rather than an accessibility test. To find the images concerned, run the free checker or follow the steps above.

Your accessibility score, yes, if Lighthouse flagged images with no alt attribute: the image-alt audit has a weight of 10 in that score. Describing images that already had an empty alt will not move it, since they already pass. Your performance score, no: it only measures speed.

Install Filikod: its audit lists every library image with a missing or empty alt, with the post it was uploaded to, and lets you mark the decorative ones. It reads the alt stored in the library, while an Image block keeps its own copy, so run the free checker on your key pages too. Our guide to finding images missing alt text compares the other methods.

Another question?

The full FAQ covers the checker, the score, the plugin and how your data is handled.

Describe it or mark it decorative

Install Filikod, list every media library image with a missing or empty alt and decide, image by image. The plugin is free and bulk editing is included. Not sure which images are decorative? Our guide to alt text for decorative images, logos and icons walks through each case.