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
srcof<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
srcand insrcset. - If a picture was removed for good, remove its
<img>too, rather than leave it to fail.
How we detect
- We render the page and record the status of every image the page's own frame loads, in each engine.
- We report an image that answered 4xx or 5xx when an
<img>of the page's HTML names it, in itssrcor itssrcset, except 401, 403, 407, 429 and 503, by which a site refuses a visitor it takes for a bot or cannot serve just now. - 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. - Scripts, stylesheets and fonts that answer an error are
resources-broken's.