Hello @freddyee,
This is Joseph from Imagify. Ioanna will be away for the rest of the weekend, so I’ll be glad to pick up where you both left off.
When using the “Use rewrite rules” option and Cloudflare together, it’s not that the rules won’t work, but instead, the issue is that Cloudflare will cache your WebP images and ends up serving them to users of browsers that don’t support them (like older versions of Safari and Internet Explorer).
If you check the headers of your images, you’ll likely see that they’re being served from Cloudflare’s servers, and so at that point, rewrite rules on your server have no effect.
If you test your pages in older versions of Safari and notice some of your images not displaying, then this is likely the reason. To fix it, you’ll need to disable the “Use rewrite rules” option in Imagify plugin settings page and then clear all caches, including Cloudflare cache.
Given that the “Use <picture> tags” option won’t work for you either, I don’t think there is an immediate solution for you to display WebP images, but I can offer the following regarding the hopefully near future:
In Apple’s recent Big Sur 11 update, they introduced support for WebP images in their newest version of Safari. Once this update is widely adopted by users and the older versions of Safari are no longer widely used, you’ll be able to safely link directly to your WebP images without the need for Imagify’s “Use <picture> tags” or “Use rewrite rules” options to provide fallback support. You can track browser support for WebP at https://caniuse.com/webp.
Please let me know if you have any further questions on this and I’ll be more than happy to assist!
Best regards,
Joseph`