My Images Never Cache

My images are never cached by Cloudflare and are not displayed through Cloudflare servers. What do I need to do for this?

The CF-Cache-Status: bypass response header indicates you have a Page Rule or Cache Rule instructing Cloudflare to bypass cache for the affected resources. If you need help figuring out which rule is causing this, please send a screenshot of your Page Rules and Cache Rules.

I am using Cloudflare pro. All my images are bypassed never cached. Do I need to buy a Cloudflare Image for Cloudflare to cache my images? :S

No, you don’t need Cloudflare Images to cache images. Cloudflare Images is a separate product that allows you to upload and serve images directly from Cloudflare.

Could you please share an affected URL?

1 Like
[type or paste code here](http://plicker.net)

cache rules is empty, not add configuration

Your origin is likely setting a header of cache-control: private for those images. To test, run this at the command line:

curl -svo /dev/null https://plicker.net/wp-content/plugins/ajax-load-more/core/img/spinner.gif --connect-to ::1.2.3.4

Replace 1.2.3.4 with your origin server IP. If you see cache-control: private in the output - that is the source of your issue. Remove that at your origin and your images should cache.

3 Likes

Yes the result is: cache-control: private. How can remove or configure it?

You’d need to look at your web server & Wordpress configuration to understand what is setting that header and remove it. It could be any number of places - you might want to speak to your hosting provider or your Wordpress admin/developer.

2 Likes

I was having trouble caching images. Standard wordpress page cache settings were made. Would adding a page rule like this be the solution for me?

In my test yesterday, it shows cache-control: private and I can’t find how to fix it.

I am using super page cache for Cloudflare plugin and Cloudflare Cache-Control max-age: 31536000 and Browser Cache-Control max-age: 60 is that correct?

May be the problem about my htaccess or this settings?

AND MY HTACCESS ABOUT IMAGES :

<FilesMatch “.(jpg|jpeg|png|gif|ico|eot|swf|svg|webp|avif|ttf|otf|woff|woff2|ogg|mp4|mpeg|avi|mkv|webm|mp3)$”>

Header set Cache-Control “public, must-revalidate, proxy-revalidate, immutable, max-age=31536000, stale-while-revalidate=86400, stale-if-error=604800”

If you can’t fix this at the origin, add an Edge Cache TTL to those page rules.

How would you suggest adding an Edge Cache TTL? Also, these settings will remain the same and should I add Edge Cache TTL as a plus?

Each of those Cache Everything page rules that aren’t caching your content should have an Edge Cache TTL setting in it.

I got it. What should be the duration of the TTL setting? Can you offer a suggestion please?

For the first six rules, I’d recommend a month. The rest, you should be able to leave alone with no Edge Cache TTL, since you said this is an Images issue.

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