squirrelscan
GitHub

Placeholder images and camera-default alt text

A placeholder service image, a 1x1 stand-in or an alt of DSC_0001 means the media was never finished. squirrel names the image and why it was flagged.

What placeholder media is

Placeholder media is an image that was never replaced with real content. Placeholder media is a stronger “unfinished site” signal than placeholder text, because a visitor sees a grey box or a stock stand-in where the product photo should be, and nothing else in an audit looks for it.

What squirrel checks

The rule runs on every crawled page over the <img> elements outside <noscript>. It emits a single check named placeholder-media:

  • Skipped when there is no parsed document, or when the page has no images.
  • Pass when nothing matched. Message: No placeholder images or camera-default alt text found.
  • Fail when an image source is a placeholder. Warn when only an alt is a camera-default name.

Three things are detected:

  • Placeholder source. via.placeholder.com, placehold.it, placehold.co, dummyimage.com, lorempixel.com, the random endpoints of source.unsplash.com, or the word placeholder in the image path or filename.
  • Blank 1x1 inline image used as content. A base64 GIF or PNG that is one pixel square, with no real data-src, srcset or <picture> <source srcset> behind it. The responsive candidates are the same ones the placeholder check reads, so a 1x1 src in a <picture> whose <source> names a real image is a stub and is not reported. A tracking pixel, a spacer sized to one pixel, an image marked aria-hidden, role="presentation" or alt="" with a one-pixel size, and a lazy-load stub that carries a real data-src all stay clean.
  • Camera-default alt text. DSC_0001, IMG_1234, DSCN0042 and similar, optionally with a file extension.

A lazy-loaded image is judged on its real source (data-src, data-lazy-src, data-original), not on the stub in src. A stub named placeholder.gif in front of a real data-src is the normal lazy-load pattern and is not reported.

When an image has responsive sources, they take precedence over src in the placeholder check. A real lazy-load source (data-src, data-lazy-src, data-original, data-srcset, data-lazy-srcset) still takes precedence over both.

  • Only the first URL of each srcset is checked: the first URL in the <img> element’s own srcset, and the first URL in each <source srcset> when the <img> sits in a <picture>.
  • When the image has at least one of those URLs, src is not checked for a placeholder. A placeholder in srcset is reported even when src is a real image, and a placeholder src beside a real srcset is not reported.
  • When the image has more than one of those URLs, it is reported only when every one of them is a placeholder, and the finding names the first. A <picture> with one placeholder <source> and one real <source> is not reported.

Overlap with the alt text rule

Plain junk alt text (image, photo, picture, img) and an alt that repeats the filename are reported by a11y/image-redundant-alt. This rule leaves them alone so a page is not penalized twice for one cause. The only alt text it adds is the camera-default names, and only when the alt is not already the filename.

Severity for the rule is warning, weight 5. The rule is skipped on soft 404 pages.

How to fix it

Replace the image source with the real asset, and add the image field to whatever check gates publishing. If a 1x1 image is only a lazy-load stub, put the real URL in data-src. For camera-default alt text, write a short description of what the image shows, or use alt="" when it is purely decorative.

Rule IDcontent/placeholder-media
CategoryContent
ScopePer-page
Severitywarning
Weight5/10

Enable / disable

Disable this rule

[rules]
disable = ["content/placeholder-media"]

Disable all Content rules

[rules]
disable = ["content/*"]

Enable only this rule

[rules]
enable = ["content/placeholder-media"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Content findings ship in every audit next to the SEO, performance and agent experience rules. See Fix SEO issues with AI for how an agent works through a report.

Check your site

Run squirrel audit https://example.com and open the Content section of the report. Each page is listed with the placeholder images found. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close