Web maintenance

How to Find and Fix Broken Images

Missing src, stale CDN files, lazy-loaded data-src. How to find broken images in the browser and what to fix besides the filename.

A broken image is a URL that was supposed to be a picture and is now a hole. Users notice faster than they notice a 404 in the footer. Search notices too if you care about image SEO, product grids, or Open Graph.

How they break

  • File moved, href did not.
  • CDN purge / expired signed URL.
  • WordPress thumbnail size that never generated.
  • srcset candidate 404s while the 1x file lives.
  • Lazy load: data-src never becomes src for bots that do not execute your slider.
  • Hotlink to a domain that started 403-ing.

Find them

DevTools — broken images show in the console and as failed network rows. Fine for one template.

View source is a lie for lazy galleries. You need the attributes the page actually uses: src and data-src.

A page scanner that treats images as first-class — that is the broken images mode in Advanced Broken Links Search. Filter the report to images, highlight the dead <img>, export the list. We built this because “link checkers” that skip pictures ship false green on shops and magazines.

Fix them

  1. Put the file back or point src at the real path.
  2. Regenerate thumbnails if the original exists and the size variant does not.
  3. Stop hotlinking. Copy the asset.
  4. Don’t 200 a 1×1 pixel to hide the 404. That is a soft-404 for images.
  5. Width/height so the layout does not jump when the real file returns.
  6. Recheck the single URL; do not assume the CDN caught up.

Whole site

Image scanning on a full crawl is heavy, so our site crawl dials pictures down and expects you to page-scan the templates that matter (PDP, article hero, homepage). That is deliberate, not a missing checkbox we forgot to market.

Broken images are not a side quest. They are the same HTTP problem as dead links, on the element people actually look at.

Check the page you just read about

Install Advanced Broken Links Search and scan the live page — links, images, redirects. Free, no account.

Add to Chrome — free

Related reading