Repository navigation
Closed
Labels
Description
Problem
Pages often load content images straight from another site's servers, for example logos from upload.wikimedia.org or images copied by URL from a supplier's or a news site's CDN. This is hotlinking. It causes three problems:
- Reliability. The image breaks when the other site moves, renames, rate-limits or blocks hotlinking (many return a placeholder or a 403 when the referrer is foreign).
- Performance. An extra DNS, TLS and connection setup to a host the page doesn't otherwise use, and no control over caching or format.
- Licensing. Using someone else's bandwidth and, often, their copyrighted image.
Nothing reports this today. images/responsive-size skips third-party hosts, and images/optimized only knows image CDNs.
Proposal
New rule images/hotlinked, page scope, no network.
- First-party hosts: the audited host, its subdomains, and hosts on the same registrable domain (
cdn.example.comforexample.com). - Allowlisted: known image CDNs and site-builder storage, used by the site on purpose:
- Cloudinary, Imgix, Cloudflare Images, CloudFront
- Shopify CDN,
wp.com, Squarespace, Wix, Contentful, Sanity, Webflow - Reuse and extend the list in
images/optimized. - Allow extension via rule options.
- Warn: a content image (
<img>,<picture><source>, CSSbackground-imagein inline styles) whose host is neither first-party nor allowlisted. Group by host: "6 images on 3 pages load from upload.wikimedia.org". - Info: the same for
og:imageandtwitter:image. Platforms fetch those, so a broken hotlinked share image fails silently. - Skip:
- tracking pixels (1x1, or known analytics hosts)
- images inside third-party embeds (iframes)
- avatars from Gravatar and similar services
Notes
- Cost: URL parsing on data the crawl already has.
- False-positive risk: medium on sites that use an unusual CDN. Rule options to add allowed hosts keep it manageable.
Acceptance Criteria
- Fixture: an
<img src="https://upload.wikimedia.org/...">onexample.comproduces a warning naming the host and the pages - Fixture: images from
cdn.example.comandres.cloudinary.comproduce no finding - Fixture: a 1x1 tracking pixel from a third-party host produces no finding
- A host added via rule options is treated as allowed
- Findings are grouped per host, with affected pages listed
- Docs page under
docs/rules/images/, including the rule options
Activity
feat(rules): images/hotlinked reports content images loaded from othe…
fix(rules): images/hotlinked is info, skips badges, scopes platform a…
feat(rules): images/hotlinked reports content images loaded from othe…
fix(rules): images/hotlinked is info, skips badges, scopes platform a…
feat(rules): images/hotlinked reports content images loaded from othe…
nc9 commentedon Oct 26, 2026
Fixed in #1028 (main 6f383f0..f70b22e): images/hotlinked reports content images loaded from another site's server, as info. Ships in v0.0.135.
fix(rules): images/hotlinked is info, skips badges, scopes platform a…