Skip to content

A picture the page shows is missing

image-brokenmoderate
On this page

Why it matters

  • A product without its photo, or an article with an empty frame where its picture should be, looks broken to the visitor, who may take the whole shop for neglected.
  • A 404 or 410 says the file is not there (RFC 9110 §15.5.5 and §15.5.11); a 5xx says the server failed to give it (§15.6).
  • Google Images finds pictures through the src of <img> elements: a picture that answers an error has nothing to show there.
  • Such errors are often left behind by an update: a file renamed, a product's photos deleted with an old version, a CDN address that changed.

How to fix

Point the <img> at a file that exists, or remove it:

html
<img src="/images/dates-box.jpg" width="800" height="600" alt="علبة تمر سكري">
  • After moving or renaming pictures, search the page's HTML for their old addresses, in src and in srcset.
  • If a picture was removed for good, remove its <img> too, rather than leave it to fail.

How we detect

  1. We render the page and record the status of every image the page's own frame loads, in each engine.
  2. We report an image that answered 4xx or 5xx when an <img> of the page's HTML names it, in its src or its srcset, except 401, 403, 407, 429 and 503, by which a site refuses a visitor it takes for a bot or cannot serve just now.
  3. Tracking pixels are left out: images a script requests, <img> inside <noscript>, those hidden (hidden, display: none, visibility: hidden) and those whose width or height attribute is 2 or less. Images that are never requested, such as lazy ones further down the page, are not judged.
  4. Scripts, stylesheets and fonts that answer an error are resources-broken's.