How to Fix Missing Image Alt Attributes on Your Website

This check flags pages containing <img> tags with no alt attribute at all. Screen readers, search engines and AI crawlers then have no description of the image and no signal that it is decorative. By the end of this guide, every image on your site will have an alt attribute: descriptive text for meaningful images and an empty alt="" for decorative ones.

⏱ 30-60 minutes🎯 Beginner● Medium impactOn-Page
ON-PAGE · FIX GUIDE Image alt attributes IMPACTEFFORT TIME30-60 minutes LEVELBeginner

Why it matters

Alt text is the main signal Google Images and AI answer engines use to understand what an image shows, so a missing attribute removes images from image search and multimodal results. For screen reader users the impact is worse. When alt is missing, many screen readers read out the file name ("IMG_4821 dot jpg"). Missing alt attributes also fail WCAG 2.2 success criterion 1.1.1, which is a common basis for accessibility complaints. The fix takes minutes per template and usually covers hundreds of images at once.

✕Before<img src="/images/hero-banner.jpg"width="1200" height="600">✓After<img src="/images/hero-banner.jpg"alt="Example Co technician installinga heat pump in a family home"

What you need

Admin access to your CMS or edit access to your theme or templates
A desktop browser with developer tools (Chrome, Edge or Firefox)
A list of affected URLs from your audit report
Optional: a crawler such as Screaming Frog SEO Spider to list images sitewide

Step-by-step fix

1

List every image missing an alt attribute

Open each flagged URL, press F12 to open developer tools, and run the snippet below in the Console tab. It lists only images where the alt attribute is absent. Images that already have alt="" are left out, because an empty alt is a valid, intentional value. For a sitewide list, use Screaming Frog: crawl the site, then go to Images → Missing Alt Attribute.

javascript
[...document.querySelectorAll('img:not([alt])')].map(i => i.currentSrc || i.src);
Pro tip: Run the snippet after scrolling to the bottom of the page so that lazy-loaded images and slider images are included.
2

Sort images into meaningful and decorative

Classify each image you found:

  • Meaningful: product photos, team photos, charts, infographics, logos that link somewhere, and images used as buttons. These need descriptive alt text.
  • Decorative: background flourishes, divider lines, icons next to text that already says the same thing, and spacer images. These need alt="".
  • Tracking pixels: 1x1 images from ad or analytics tags, often inside <noscript>. These also get alt="".
Pro tip: Use this test: if you deleted the image, would the page lose information? If yes, it is meaningful.
3

Write descriptive alt text for meaningful images

Describe what the image shows and why it is on the page, in roughly 5-15 words. Don't start with "Image of" or "Picture of", because screen readers already announce it as an image. For linked images, describe where the link goes. For charts, state the key takeaway.

html
<img src="/images/team.jpg" alt="The Example Co support team at our Leeds office" width="800" height="533">
<a href="/"><img src="/logo.svg" alt="Example Co home"></a>
<img src="/charts/q3.png" alt="Bar chart: Q3 2025 sales up 24% over Q2">
Pro tip: Include a keyword only where it genuinely describes the image. Alt text stuffed with keywords hurts accessibility and can be treated as spam.
4

Add alt="" to decorative images and pixels

Give decorative images an empty alt attribute so assistive technology skips them. Write it as alt="" with no space between the quotes. Leaving the attribute out entirely is what triggers this check. For tracking pixels, edit the tag in your tag manager or theme and add alt="" to the <img> inside the <noscript> block.

html
<img src="/images/divider-wave.svg" alt="" width="1200" height="40">
<noscript><img height="1" width="1" style="display:none" alt="" src="https://www.example.com/tr?id=123&ev=PageView"></noscript>
Pro tip: If an image is purely decorative and you control the CSS, consider moving it to a CSS background-image. Background images are not <img> tags and need no alt.
5

Fix images hard-coded in theme templates

Images that repeat on every page, such as the header logo, footer badges, payment icons and slider images, usually come from template files and are often the bulk of the count. Search your theme for <img tags with no alt and fix each one once. For images that come from CMS fields, output the stored alt text from that field rather than hard-coding a value.

liquid
{{ section.settings.image | image_url: width: 1200 | image_tag: alt: section.settings.image.alt, loading: 'lazy' }}
Pro tip: In a code editor, a regex search for <img(?![^>]*\balt=)[^>]*> finds <img> tags with no alt attribute.
6

Re-check the flagged pages

Clear any page cache or CDN cache. Then reload each flagged URL and run the console snippet from step 1 again. It should return an empty array []. Re-crawl the site or re-run the audit to confirm that no pages still contain images without an alt attribute.

javascript
document.querySelectorAll('img:not([alt])').length; // expect 0

Platform-specific notes

WordPress

Go to Media → Library, click an image, and fill in "Alternative Text". This only applies to future insertions. Images already placed in posts keep the alt that was saved at insert time, so also select each Image block in the editor and set "Alternative text" in the right-hand Block settings sidebar. Theme or page-builder images (Elementor, Divi) have their own alt fields or an option to pull alt from the Media Library.

Shopify

Go to Products → select a product → click a media item → "Add alt text", and do the same for collection images under Content → Files. In themes, the image_tag filter outputs the image's alt by default. Hand-written <img> tags in sections and snippets often omit alt, so pass alt: image.alt explicitly, or alt: '' for decorative images.

Next.js

The next/image <Image> component requires an alt prop, and recent versions warn in development when it is missing. Pass alt="" for decorative images. Plain <img> tags, and images rendered from CMS or Markdown content, need a fallback in your renderer, for example alt={image.alt ?? ''}. Enable the eslint-plugin-jsx-a11y rule alt-text to catch omissions at build time.

Wix

Click the image in the Editor, choose Settings, and fill in "What's in the image? Tell Google". Wix gallery and Wix Stores product images have their own alt fields in each item's settings.

Webflow

Open the Assets panel, click the gear on an asset, and set Alt text. On each Image element, the Element settings panel lets you choose that asset alt text, enter a custom value, or mark the image as "Decorative", which outputs alt="". For CMS images, bind the alt to a CMS text field.

Check that it worked

✅ How to verify

  • Run document.querySelectorAll('img:not([alt])').length in the browser console on each previously flagged URL and confirm it returns 0.
  • Re-crawl with Screaming Frog and check that Images → Missing Alt Attribute is empty.
  • Run Lighthouse (Chrome DevTools → Lighthouse → Accessibility) and confirm the "Image elements have [alt] attributes" audit passes.
  • Re-run this audit and confirm the check no longer lists any pages.

⚠️ Common mistakes

  • Updating alt text in the WordPress Media Library and assuming existing posts are fixed. Alt saved inside post content does not change automatically.
  • Leaving out the alt attribute on decorative images instead of using alt="". A missing attribute and an empty one are treated very differently by screen readers and audits.
  • Using the file name or a generic word as alt text, such as alt="image" or alt="DSC_0042". This passes the check but helps neither users nor search engines.
  • Fixing content images while ignoring template images, lazy-load placeholders and tracking-pixel <noscript> images, which repeat on every page.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

Is an empty alt attribute bad for SEO?

No. alt="" is the correct markup for decorative images. It tells screen readers to skip the image and tells search engines it carries no content. Only meaningful images need descriptive text.

How long should image alt text be?

Usually 5-15 words, or about 125 characters at most, because some screen readers split longer text into chunks. Describe what is shown and why it matters on that page. Put long explanations, such as full chart data, in the surrounding text.

Does alt text help images rank in Google Images?

Yes. Google's image SEO documentation names alt text, together with the surrounding page content and the file name, as key signals for understanding and ranking images. Accurate alt text also helps AI search features match your images to queries.

Should alt text be the same as the image title attribute?

No. The title attribute only shows as a tooltip on hover and is not a substitute for alt. Search engines and screen readers rely on alt, so set alt on every image and treat title as optional.