Repository navigation
Description
Request: parse Google image sitemap entries (ˋ<image:image><image:loc>ˋ under each <url>) and add a rule that flags indexable pages whose main image (og:image / Product JSON-LD image) is missing from that page's sitemap image entries.
Why: image search traffic for shops depends on product images being discoverable; the sitemap is the documented way to declare them (https://developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps). squirrel already reads sitemaps for crawl/sitemap-* rules, so the data is one parse away, but today the image entries are dropped.
Details that avoid false positives:
- normalize image URLs before comparing (strip CDN size suffixes like Shopify's
_800xand query strings); - Shopify includes product images in its sitemap by default, so a stock Shopify sitemap should produce no finding;
- only indexable pages (200, no noindex, self-canonical), cap images per URL.
Suggested rule id: images/sitemap-missing (low severity).
Triage
Confirmed as a feature request, not a bug. The sitemap reader in packages/crawler/src/sitemaps.ts extracts loc, lastmod, changefreq and priority per <url>; ˋ<image:image>ˋ / ˋ<image:loc>ˋ children are dropped. There is no images/sitemap-missing rule today. It needs a parser change (keep image entries, capped per URL), a new rule in packages/rules/src/images/, and a docs page.
Acceptance Criteria
- The sitemap parser keeps
ˋ<image:image><image:loc>ˋentries per<url>, capped per URL - New rule
images/sitemap-missing(low severity) flags an indexable page (200, no noindex, self-canonical) whose main image (og:image or Product JSON-LDimage) is absent from that page's sitemap image entries - Image URLs are normalized before comparing (query strings and CDN size suffixes such as Shopify
_800xremoved) - A stock Shopify sitemap produces no finding (fixture test)
- Non-indexable pages and pages without a main image are not flagged
- A site with no image entries in its sitemap behaves as documented (decided and tested)
- A rule docs page is added and
make validatepasses indocs/
Generated by Claude Code
Activity
fix(crawler): store sitemap image entries so images/sitemap-missing s…
fix(rules): images/sitemap-missing matches Shopify's two image URLs a…