Prevent images from being purged from cache

The issue:

I run several Wordpress sites that include an unusually high number of small product images that are never updated.

I use edge caching and workers on these sites.

When these sites are updated, and pages/post purged, the images are also purged from the cache. This is inefficient since the images have not changed. It then takes a long time to preload/rebuild the cache.

My questions:

  1. Is there any way to ensure the images are not purged from the cache when the rest of the site is purged?

  2. Is it possible to set up a subdomain - for example - from which would pull the images - on Cloudflare? I understand how to set up a subdomain on Cloudflare, but since the A name would be on the same domain in the Cloudflare dashboard, would that mean that the files are also purged when the has a ‘purge all’ command? Or not?

Thanks for your help.

Only Enterprise plans let you purge by class, such as hostname or tag. Otherwise, you would have to individually purge each the updated resources.

The other option would be to use a dedicated CDN on its own unproxied hostname.

Is it possible to do this using a domain or sub domain in the same Cloudflare dashboard, and if so, how?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.