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

    (@mateuszgbiorczyk)

    Hi @huusmann,

    Thnk you for your message.

    By using Cloudflare you lose the ability to cache via Cloudflare. Cache-Control is set to private, which means that the proxy server, i.e. Cloudflare, does not cache images.

    The free version of Cloudflare does not support the Vary header. This prevents the plugin from working. How does the plugin work?

    When a browser tries to download an image file, the server checks if it supports the AVIF format (if enabled in the plugin settings). If so, the browser will receive the equivalent of the original image in the AVIF format. If it does not support AVIF, but supports the WebP format, the browser will receive the equivalent of the original image in WebP format. In case the browser does not support either WebP or AVIF, the original image is loaded. This means full support for all browsers.

    When Cloudflare does not support the Vary: Accept header then you cannot dynamically load WebP files or files such as JPEG. Only for everyone is the WebP file loaded, regardless of whether the browser supports this format or not.

    In the Accept header, the browser sends information about the image formats it supports. The cache should not only write to the cache based on the URL, but also based on the Accept header. Because two different browsers with two different Accept headers should receive two different content at the same URL.

    Best,
    Mateusz

    Thread Starter huusmann

    (@huusmann)

    Hello there,

    Thanks for your prompt answer.
    As far as I can understand from your answer, your plugin is probably not the best in our case.

    Thanks.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @huusmann This is how all plugins work. All plugins use a similar model of functioning.

    Hello @mateuszgbiorczyk is there still no option for your plugin to just convert to WEBP and not handle the decision?

    Today I already create websites only with WEBP, so why let a minority interfere in the performance of a project?

    If I change the headers per cloudflare rules, would this header be rewritten and work as I expect? taking the decision from your plugin?

    I wanted to know if there is a better solution.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @ofmarconi Everything is described here. Nothing has changed in this matter – this is due to the limitations provided by Cloudflare.

    thx so much

    So if I want to ignore the error message and want to use the plugin together with Cloudflare’s CDN for only browsers compatible with webp, can I do so without any problem?

    hedgehog90

    (@hedgehog90)

    I see in the generated .htaccess file in uploads the condition:

    RewriteCond %{HTTP_ACCEPT} image/webp

    Which I assume is the Vary: Accept header.
    Is there an option to remove this condition to allow cloudflare to cache & deliver the webp images on subsequent requests?

    • This reply was modified 8 months ago by hedgehog90.
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hedgehog90 Please read this entire thread again. I described everything above.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cloudflare free plan with Converter for Media’ is closed to new replies.