Disabling cached images in cloudflare

Hi there,

I have integrated imagekit for my image loading. I have disabled the proxy for my subdomain images.empireskate.co.nz where the images are now served, but the images are still served are still old ones being cached by cloudflare.

I was using polish but have turned this off, I have purged the cache multiple times, does anyone have any ideas on how to stop the cached cloudflare images from being served.

The weird thing is I have two websites, the one that I never setup polish with is working fine - the setups are the same, so I believe somehow Polish, even though deactivated is causing the caching issue?

If you’re still seeing old cached images using that set up, I would suggest looking in to the cache issue on your origin (e.g. according to the current set up, imagekit.io would be the likely place to dig in to, and/or if you have another server behind them, perhaps that server).

When the Proxy status is set to Unproxied (:grey:) / DNS-only, traffic will be flowing directly to the origin, and would not be using Cloudflare at all.

Thanks for getting back to me.
My origin server is Shopify cdn - I can ask Shopify if they can purge the cache.

However, it is my understanding that the imagekit script should be manipulating the URL from the Shopify CDN to my images subdomain… It is working well on my duplicate store on a different domain, so I’m confused as to why it’s not working on my other website that has almost identical settings and setup other than the TLD (separate Shopify domains)

Here’s a summary of the problem:

  • Images are loading from the Shopify CDN (cdn.shopify.com ) instead of images.empireskate.co.nz as intended.
  • Some images are loading from both domains, causing duplicates.
  • The NZ site has double the image requests compared to the AU site.

Steps I’ve Taken:

  • Confirmed images-empireskate.imagekit.io CNAME record is NOT proxied through Cloudflare.
  • Verified all settings in theme imagekit snippet and customizer.
  • Verified code is identical to the working AU site.
  • Purged Cloudflare cache multiple times.

Example URLs:

  • Serving from Shopify CDN instead of ImageKit:
    • http://cdn.shopify.com/s/files/1/0236/5073/files/ray-ban-3589-arista-dark-brown-polar-sunglasses-empire-skate-2-21948765438054_500x.jpg?v=1705011
    • Should be: images.empireskate.co.nz/s/files/1/0236/5073/files/ray-ban-3589-arista-dark-brown-polar-sunglasses-empire-skate-2-21948765438054_500x.jpg?v=1705011
  • Duplicate images from different domains:
    • https://www.empireskate.co.nz/cdn/shop/files/ray-ban-clubmaster-havana-brown-sunglasses-empire-skate-1_1200x.jpg?v=1705012750
    • https://images.empireskate.co.nz/cdn/shop/files/ray-ban-clubmaster-havana-brown-sunglasses-empire-skate-1_2000x.jpg?v=1705012750

Product pages in question:

  • www.empireskate.co.nz/products/ray-ban-clubmaster-havana-brown
  • www.empireskate.com.au/products/ray-ban-clubmaster-havana-brown

Unfortunately, ImageKit support has been unhelpful so far. I’d appreciate any insights or suggestions from the Cloudflare community to resolve this issue.

Thanks in advance!

Hi, did you just disable ImageKit?

It was active when I first loaded your site a few minutes ago, but seems to be disabled now.

Just some general information:

Shopify is using Cloudflare, so any images loaded from Shopify will include the Cloudflare headers.

I don’t think that is supported with Shopify, unless you have an Enterprise account at Cloudflare.

See these for more information:

Thanks for the info, I haven’t touched anything, regarding the integration. That’s weird that it worked and then didn’t…

I’m hoping image it will get back to me and do some investigation on their end.

I used polish/mirage on the paid plan with Shopify, which seemed to work fine.

It just doesn’t make sense that one site works how it should and the other doesn’t. Code is exactly the same for both…

This topic was automatically closed after 15 days. New replies are no longer allowed.