Skip to content

Black Friday 50% off your first year on all premium plugins and the Suite.

See the deals

Decorative images and empty alt

When an image should have empty alt text, how to mark it decorative in WordPress, and how to stop AI alt text tools filling it in.

3 min read · Updated 6 November 2026

Not every image should be described. A divider line, a background texture or an icon next to a text label adds nothing for someone using a screen reader — describing it just makes them listen to noise. Those images should have empty alt text: alt="". That is different from having no alt attribute at all, which makes some screen readers read out the file name instead.

Is my image decorative?

Ask: if the image disappeared, would anyone lose information? If not, it is decorative. Typical examples:

  • Ornaments, dividers, background shapes and textures.
  • An icon beside a text label that already says the same thing (a phone icon next to “Call us”).
  • A photo that only repeats the heading or the text next to it.

Not decorative: logos that link somewhere (describe the destination), product photos, charts, and images that are the only content of a link or button.

How to mark an image decorative in WordPress

Block editor

Select the Image block and leave Alternative text in the block sidebar empty — the field’s help text says “Leave empty if decorative.” WordPress then outputs alt="". The block keeps its own value, so filling in the Media Library later does not change it.

Featured images, galleries and theme images

These read the alt text from the Media Library each time the page loads. Clear the Alternative Text field in Media › Library to make them decorative.

Page builders

Most builders have their own alt text field per module or widget; leave it empty. Better still, for pure decoration use the builder’s background-image option — CSS backgrounds are ignored by screen readers and need no alt text at all.

The catch with automatic alt text tools

An empty alt text field looks exactly the same whether you meant it or forgot it. Every automatic tool that “fills in missing alt text” — including ByteKeel PixTag and ByteKeel PixTag Pro — will fill in a deliberately empty one. The WordPress Learn lesson on AI content makes the same point: AI writes alt text for decorative images too, and you have to clear it.

How to keep both:

  • Use backgrounds for decoration. If ornaments and textures are CSS backgrounds rather than Media Library images placed in content, no tool will touch them.
  • Clear it where it is used. For images placed with Image blocks, clear the block’s alt text. The library value does not matter there.
  • Run bulk jobs before you curate. Generate alt text for the whole library once, then clear the decorative ones. Later runs with “Only images missing alt text” would refill them, so after that, target new uploads only (in ByteKeel PixTag Pro’s Bulk Processor, use the Date From filter).
  • Name decorative files consistently (for example deco-wave.svg, bg-texture.jpg) so a developer can exclude them.

For developers: keep decorative files empty in ByteKeel PixTag Pro

ByteKeel PixTag Pro’s altgen_pro_alt_text filter runs just before saving. Returning an empty string saves an empty value. Note that the same value goes into every field ticked under Metadata to Generate, so the image title is blanked too if it is ticked.

add_filter( 'altgen_pro_alt_text', function ( $alt_text, $attachment_id ) {
	$file = wp_basename( (string) get_attached_file( $attachment_id ) );
	if ( preg_match( '/^(deco|bg)-/i', $file ) ) {
		return '';
	}
	return $alt_text;
}, 10, 2 );

Frequently asked questions

Does empty alt text hurt SEO?

Not for decorative images. Search engines have nothing useful to learn from a divider line. Empty alt text on meaningful images, such as product photos, is a missed opportunity.

Will accessibility checkers flag alt=""?

Good checkers treat alt="" as a valid decorative image and only flag a missing alt attribute. Some simple SEO tools count empty alt text as “missing”; you can ignore that for decorative images.

Should a logo have alt text?

Yes. A linked logo needs alt text that says where the link goes, usually your site name. A logo repeated right next to the site name in text can be empty.

Is “decorative image” a good alt text?

No — that is the worst of both: the screen reader still stops and reads it out. Leave it empty.

Did this answer the question? No — open a support request