Google Pagespeed Module under CloudFlare

We have installed Google Pagespeed Module on our website (Server info: nginx/1.17.5, PHP version: 7.2.24-0ubuntu0.18.04.1,Wordpress) and noticed that styles and css files were processed correctly but jpeg images were not processed. Everything is correct when we turn on Development Mode in Cloudflare.
Does anyone have manual how to integrate Cloudflare and Google PageSpeed Module?
It does not work “by Default” at all and CloudFlare Support replied bullshit.

Since you mentioned JPG, you are probably having issues with WebP, a new image format that Pagespeed Mod will generate on the fly based on the browser compatibility. The problem is that Cloudflare will cache the image when the first visitor arrives, and serve it to subsequent visitors, ignoring whether or not they are compatible with WebP. Safari, as well as all browsers for iOS are not compatible. You should try to turn off that specific Pagespeed Mod filter, see if that solves your issue.

I’m using Webp Format as indicator now.
If i turn off Pagespeed Webp format automatic conversion Cloudflare takes first (unoptimized) version of my page and all later hits uses this unoptimized version from Cache.
How to override it?
I can turn off cloudflare caching but it kills performance.
I need to tell CloudFlare that already cached file was updated and new version must bу used.

Someone gave me a great advice once, Never use two optimisation simulataenously.

The idea is not to stop all server-level optimization, but only jpg > webp conversion. After you disable this specific filter, you need to hit Purge Everything on the Cache app to make sure CF will fetch the non-optimized images from the server when the next visitor comes in.

But once you do this, the image will be available for all in the format the server delivers it, no way to override unless you are on Pro plan or higher. Then you can add Polish to (further) optimize images at the edge and they will be converted to webp only when the device accepts it.

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