My Wordpress website (NGINX server) uses ShortPixel plugin to serve WebP images to browsers that support them and regular PNG or JPEG images to browsers that don’t.
The delivery method is the
This also means that if the image is accessed directly, the JPG should be delivered.
I have found CF caching is 302 redirecting some JPG to WebP images - this is causing me problems on Safari 14 and 15 on MacOS Catalina, which doesn’t support WebP images, (although note - the same version of Safari can support WebP image when running on MacOS Big Sur) and when sharing images on sites like Pinterest.
When using CF development mode, (or initially after clearing CF cache), everything works as expected. After some time clearing cache, various images on my site start to have the problem.
It seems CF Caching is 302 redirecting JPG to WebP after a while for these images. For example:
is (currently) redirecting to WebP version, but other images such as this one:
are performing as expected:
These are images for posts promoted on my homepage https://poultrykeeper.com/
I have found a few other posts about this issue, but none of them answers this exact issue. They seem to propose alternative methods to deliver WebP using CF.
I would like to understand why CF is introducing this redirect and find a fix to continue to deliver WebP or JPG from my Website so I can use CF and Automatic Platform Optimisation.
I do NOT have Image Resizing, Polish, Rocketloader, APO, Mirage or Rocket Loader enabled, so these shouldn’t be interfering with the images in any way.
Thanks for your help,