Image Caching Test
The Image Caching Test inspects the Cache-Control headers on every image referenced by a URL and reports whether each is cacheable, for how long, and whether the cache strategy matches the asset's update cadence.
- Results in seconds
- Pass / fail + fix guidance
- No account required
The Image Caching Test inspects the Cache-Control headers on every image referenced by a URL and reports whether each is cacheable, for how long, and whether the cache strategy matches the asset's update cadence. Images rarely change once published — yet many sites cache them for only an hour or fail to cache them at all, forcing repeat downloads of multi-megabyte hero images on every visit.
What This Tool Checks
- Cache-Control header on every image
- max-age value per image
- immutable directive on hashed image URLs
- CDN cache hit / miss for images
- ETag and Last-Modified headers
- Vary headers preventing image caching
Why It Matters for SEO
Images are typically 50-70% of page bytes. Cached images cost zero bytes on repeat visits — but only if the cache policy is correct. Many CMSes ship images with no Cache-Control header, defaulting to short browser-driven heuristics. Setting a long max-age on image URLs is a one-line CDN config change that often shaves seconds off repeat-visit load times.
How to Fix It
Set Cache-Control: public, max-age=2592000 (30 days) on all image responses. Add immutable on URLs that include a content hash. If you content-negotiate WebP / AVIF, include Vary: Accept. Configure your CDN with a TTL at least as long as the browser max-age.
How It Works
We walk every image referenced on the page (img src, picture source, CSS background-image), make a HEAD request to each, and capture the cache-related headers. Each image is rated for cacheability and the savings from improving its policy are estimated.
Common Mistakes to Avoid
- Images with no Cache-Control header at all
- Short max-age (hours instead of weeks/months)
- Hashed image URLs without immutable
- Missing Vary: Accept blocks WebP / AVIF negotiation
- CDN cache TTL shorter than browser max-age
Quick Checklist
- All images return Cache-Control: public, max-age=2592000+
- Hashed URLs include immutable
- CDN cache hit on repeat requests
- Vary: Accept set when content-negotiating WebP/AVIF
- ETag or Last-Modified for conditional requests
Put your whole site on autopilot — SEO and AI search
PositionMySite monitors every signal on this page across your entire website 24/7 — plus keyword rankings, competitor moves and AI-search readiness (llms.txt, schema, ChatGPT & Gemini visibility). When something breaks, you know before Google does.
Every feature unlocked · No commitment · Cancel anytimeFrequently Asked Questions
30 days minimum is typical. Hashed image URLs (with a content hash in the filename) can use 1 year + immutable. Re-uploads with the same filename should bust the cache via versioning.
Tells the browser the response will never change during its max-age, so the browser skips revalidation entirely. Use only when the URL changes when the content changes (e.g. /img/hero.a3f9c2.jpg).
Repeat visits load instantly when images are cached, improving real-user load metrics (CrUX field data) that Google uses for Core Web Vitals scoring. Slow image loads hurt LCP directly.
Yes if you serve WebP / AVIF based on the Accept request header. Without Vary: Accept caches may serve a WebP to a browser that requested JPG.
Most CDNs cache image responses with sensible defaults, but explicit Cache-Control headers from origin override defaults and ensure consistent behaviour across browsers.