Images and Media Optimisation
Fixtures covering alt-text extraction, image dimension and scaling analysis, encoding-quality and next-gen format opportunities, animated-GIF-versus-video classification, hidden and offscreen image detection, and favicon handling.
Fixtures that let a crawler prove it attributes image-level optimisation signals correctly: which page referenced the image, what the reference markup declared (alt, dimensions, container sizing, loading attributes), and what the image resource itself looked like on the wire.
Families:
- Alt text: a plain
<img>with noalt, asrcsetreference withalt="", an anchor whose only content is an alt-less image, and correct decorative markup (alt=""withrole="presentation") that the empty-alt predicate still flags. - Dimensions and scaling: an image with no declared
width/heightand no CSS sizing, and a 1600x1067 image rendered inside a 200px container so a browser discards almost all downloaded pixels. - Encoding quality: two photo fixtures bracketing the recompression threshold — the larger one also crosses the next-gen format and per-image weight lines, anchoring the whole encoding family.
- Next-gen formats: a photographic-class truecolour PNG, the canonical WebP/AVIF-would-win case.
- Animated content: the same animation as an over-threshold GIF image and as the recommended autoplaying, looping, muted MP4 replacement.
- Hidden and offscreen: eager images that are fully invisible
(
display:none) or fully below the fold, each followed by a deliberate ~200 ms long task so the defer-offscreen signal is deterministic. - Favicons: a
rel="icon"link to a registered 404, an icon served with a deliberately wrongContent-Type, and a page declaring three sized icon links. No favicon hint exists in the product, so these are capability-only.
Every image body is generated deterministically as PNG bytes with the fixture
marker in a tEXt chunk; routes with non-PNG extensions deliberately serve
those PNG bytes under the extension’s declared content type. The whole group
is safe to crawl; the wrong-content-type icon is moderate because it probes
type-mismatch handling.
Fixtures in this category
- Images missing alt text —
images-missing-alt-page(safe) - Linked image missing alt text —
images-linked-missing-alt-page(safe) - Decorative image with empty alt —
images-decorative-alt-page(safe) - Image without declared dimensions —
images-missing-dimensions(safe) - Browser-scaled image —
images-scaled(safe) - Inefficiently encoded image — large saving —
images-encoding-q100(safe) - Inefficiently encoded image — moderate saving —
images-encoding-q92(safe) - Photographic truecolour PNG —
images-nextgen-png(safe) - Animated GIF over the video threshold —
images-animated-gif(safe) - Animation delivered as video —
images-animated-video(safe) - Hidden eager image —
images-hidden(safe) - Offscreen eager image —
images-offscreen(safe) - Favicon link to a 404 target —
images-favicon-missing(safe) - Favicon with a mismatched content type —
images-favicon-wrong-content-type(safe) - Multiple sized icon links —
images-favicon-multi-size(safe) - Alt-less image asset —
images-missing-alt-asset(safe) - Linked alt-less image asset —
images-linked-missing-alt-asset(safe) - Decorative image asset —
images-decorative-alt-asset(safe) - Undeclared-dimensions image asset —
images-missing-dimensions-asset(safe) - Scaled 1600x1067 image asset —
images-scaled-asset(safe) - Large-saving photo asset —
images-encoding-q100-asset(safe) - Moderate-saving photo asset —
images-encoding-q92-asset(safe) - Photographic PNG asset —
images-nextgen-png-asset(safe) - Animated GIF asset —
images-animated-gif-asset(safe) - MP4 video asset —
images-animated-video-asset(safe) - Hidden image asset —
images-hidden-asset(safe) - Offscreen image asset —
images-offscreen-asset(safe) - 16x16 favicon asset —
images-favicon-16(safe) - 32x32 favicon asset —
images-favicon-32(safe) - 180x180 apple-touch icon asset —
images-favicon-180(safe) - Wrong-content-type icon —
images-favicon-wrong-content-type-icon(moderate)