• Resolved tekgirlymama

    (@tekgirlymama)


    Hi Mateusz!

    Thank you for the work on plugin, and I am a pro customer. Glad to help support the plugin.

    Why are the images not cached by Cloudflare and marked as private cache?

    I’m on a free CF plan. Does it not support images?
    Or do I need a rule for cache all? and if so, any particular directory for this rule to seek the images?

    Also, how to get it to work with HTML output like from plugins as Simply Static?

    Thanks for your time.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hello @tekgirlymama,

    Thanks for your message.

    With Cloudflare Free, there is no other solution than making the Cache-Control as private. Cloudflare Free does not support the Accept header which is necessary to load the correct files for your browser.

    Best,
    Mateusz

    Thread Starter tekgirlymama

    (@tekgirlymama)

    Thanks. OK, what reg their new CF Images plan? Wish there was a plugin for this as it’s necessary to be a coder to use it. A great CDN solution for images and webp/avif, FYI. Unless I got it wrong ? How about making a plugin to push from website to their image plan for a hosted free account. Better than needing to pay $20 per every website and we have many, is to pay $5/mo for all.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @tekgirlymama With the Cloudflare Free plan, it is not possible to dynamically load WebP and AVIF files, depending on whether the browser supports the file format. It is always loaded the same as Cloudflare Free does not support the Accept header which is crucial.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @tekgirlymama I will explain it even more.

    For Cloudflare free plans, our plugin will disable Cloudflare Caching (but images in WebP and AVIF format will be displayed correctly). The Cache-Control header will be set to private. This is because in the Cloudflare free plans does not support the Accept header (read more). Available “Vary for Images” in your Cloudflare plan is necessary for our plugin to function properly using Cloudflare CDN Caching when loading WebP and AVIF files.

    Thread Starter tekgirlymama

    (@tekgirlymama)

    Oh, I am so sorry to hear this. Really, I think it should be made clear on your description as millions use CF and may use your plugin nd not even realize page loads slower now because images not cached!

    I use LS CAche with QUIC to get the webp images and CF caches those. Now I use yours to turn webp into avif, but NOW no caching. meaning, super slow load for those in Oceania and def need CDN and CDN won’t catch your avifs.

    I paid you for 1 y pro $100 and now need to pay $240/y per EVERY site on CF just to be able to use your plugin properly?

    I mean i can use it, BUT page not getting images cached is a BIG bummer on landers we have, as that’s 1.5MB on a long page.

    now what. cheaper I use CF images for $5/mo no site limits. Just need a plugin for it. Bummer. Or the QUIC CDN or no cdn and no AVIF.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @tekgirlymama These are Cloudflare restrictions that are independent of my plugin. I do my best to make the plug work as good as possible.

    According to my tests, in most cases a much smaller weight of images is better thanks to the use of AVIF format instead of a CDN server.

    Thread Starter tekgirlymama

    (@tekgirlymama)

    Long landers with 1.5MB images after compression sand optimizations may require CDN especially for visitors from across the globe, or? Wouldn’t a CDN be faster for them?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @tekgirlymama I understand you the most. But try to understand me. These are limitations of Cloudflare, and you can read more about it here. The point is that the “Vary for images” option is not available for Cloudflare free. This is plug-independent. I’d love to do about it, but I’m limited at the moment.

    @mateuszgbiorczyk
    Hi there. Thanks for the nice plugin!
    I understood from this thread that CloudFlare Free does not support it.

    So I have one suggestion, how about allowing us to choose how to place JS WebP Rewriting like EWWW Image Optimizer?
    In other words, create a tag like the following, and if the browser supports WebP, use data-src-Webp, and so on.
    <img src="xxx.jpeg" data-src-webp="xxx.jpeg.webp" ...

    Best.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @cck23 Thanks for the suggestion. This method requires JavaScript to modify the URL of the image. It is not an optimal solution in terms of performance, so I do not plan such solutions.

    @mateuszgbiorczyk
    Thanks for your quick reply!
    OK, I hope the plugin will be better.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to get Cloudflare to cache HIT the images?’ is closed to new replies.