Blog / Technical SEO /

Technical SEO: image CDN changes and cache headers

Switching to an image CDN sounds like a quick win. Faster images, smaller files, done by lunch.

Until the product photos go missing on one template, or an updated image refuses to update for days. An image CDN can make media delivery much more efficient. It can also break images across the site if URLs, transformations or cache rules change without a plan.

Quick definitions first. An image CDN serves image files through a delivery network and may resize, compress or convert them. Cache headers tell browsers and intermediary caches how long a response can be reused. Both affect performance; neither removes the need to check how the site uses its images.

Inventory how images are served now

Before switching, identify the image host, URL patterns, transformations and formats. Look for images used in product pages, collection cards, social previews, CSS backgrounds and structured data. The same source image may be requested at different sizes.

Record the current behaviour. Which URLs return successful responses? Which parameters control width or format? Are assets reused across domains? This makes it easier to spot a change that affects only one template.

Choose cache behaviour with updates in mind

Long-lived caching can work well for versioned or fingerprinted assets, because a changed file gets a new URL. If the URL stays the same while the image changes, a long cache lifetime may leave visitors seeing an old version.

Don’t treat Cache-Control as a magic number to copy from another site. I’m wary of any cache setting nobody can explain. The right policy depends on whether the asset URL changes when its content changes, how the CDN invalidates objects and whether the origin supports revalidation.

Test the migration in stages

Use a small set of representative images: a product hero, thumbnail, responsive image and an asset loaded through CSS. Compare response status, content type, dimensions and cache headers before and after. Confirm that transformations do not crop important product details or create unnecessarily large files.

Check the rendered pages and crawl the main templates. Look for broken URLs, mixed-content warnings, stale assets and unnecessary redirects. If image URLs change, assess whether old URLs need redirects and make sure sitemaps or feeds use the preferred URLs.

Monitor what matters

Review page loading and the Core Web Vitals metrics—LCP, INP and CLS—on relevant templates. A CDN change can affect LCP through image delivery. But one metric moving doesn’t prove the CDN caused it. Other page changes, traffic mix and device conditions matter too.

Write down the rollback path before rollout. A cache rule should make the site faster without making updates mysterious. Which image pattern would you test first on your site?

Include cache behaviour in the acceptance criteria

A migration is easier to review when the team agrees what “working” means before launch. Choose a few URLs that represent different image behaviours: a responsive product image, a small card, a CSS background and a file that has been replaced recently. For each one, record the expected dimensions, format, status and caching behaviour. This turns a vague visual check into a repeatable comparison.

Also ask how the CDN handles a changed source file. Some systems use a new URL when the asset changes; others may keep the same public URL and rely on invalidation. If editors cannot tell whether an update is visible, they may upload duplicates or repeatedly clear caches. Document the normal publishing path and who can request a purge.

Watch for hidden dependencies

Image URLs can appear in structured data, social cards, email templates and feeds as well as the rendered page. A migration that updates only the HTML may leave these references pointing to an old host. Search the code and content for the old host or distinctive URL pattern, then verify the important outputs after deployment.

Do not judge success from one fast page load. Compare the relevant templates under similar conditions and separate the image change from unrelated design or script work. If a metric shifts, inspect the actual image request and page experience before attributing the difference to the CDN. The useful result is a delivery setup the team can maintain, not a cache policy copied from a different architecture.

Make ownership and rollback explicit

Write down who can change the origin, who controls the CDN configuration and who can invalidate a cache. If those responsibilities sit with different people, agree how a change is requested and verified. A migration can fail even when each team completes its own task if no one checks the full route from source file to rendered page.

Keep a sample of the old response details and the new expected behaviour with the release notes. If a browser continues to show an old image, that record helps distinguish a browser cache from an origin issue or a CDN rule. Don’t make “clear every cache” the default fix for editors. It hides a broken invalidation process and makes diagnosis harder. On the client sites I look after, I’d rather fix the purge process once than repeat that advice every week.

After the rollout, review a representative page on desktop and mobile and check the image itself, not only the response header. A technically successful response can still serve the wrong crop or a low-resolution asset. Ask the content editor to confirm that the important subject remains visible.

Keep a simple record of the cache policy for each asset class. Images, scripts and user-generated uploads may have different update behaviour, so a single global rule can cause stale content or unnecessary revalidation. Review the policy when the publishing workflow changes.

When a request is served from cache, verify that the response still reflects the correct asset and content type. If a file has changed but the URL has not, define how invalidation happens and how editors can confirm completion. This small operational detail often determines whether the migration feels predictable to the people maintaining the site.

If a policy changes, note the reason and the affected asset pattern. Future maintainers then won’t revert a deliberate rule while chasing an unrelated problem.

So before any rollout, pick four representative images and write down their current status, size, format and cache headers. Which one are you least sure about?