Hi @nomadandinlove – you should not use WebP Express if you are going to cache everything on edge servers.
Let’s suppose that you are using CDN Friendly mode, which basically alters the HTML output based on visitor’s browser string (UA), now think what would happen if the first visitor that comes to the page uses a browser that supports WebP. Well, plugin will work and it will alter HTML to use WebP, but now Cloudflare will cache that modified content on their servers. So, now if someone access the website with a browser that does not support WebP, they will still get WebP images because that request never makes to the server.
The only scenario where you can get this setup working is if you use HTTP vary-headers but you will need to upgrade your Cloudflare account.
@ashucg You are not exactly correct.
I managed to setup caching, CDN and alter HTML with “append webp” instead of replace or vary response.
CDN will cache both jpg and webp version.
However, this requires some custom code in template files for images obtained with ajax, some nginx rules implemented.
@samtyurenkov – alter HTML is not always an option for all websites, that’s why it is an option and not the default behavior 🙂
@ashucg So if I upgrade my Cloudflare account, I may as well use Cloudflare to serve WebP.
@samtyurenkov Do you have any resources I can follow to implement this?