So the first image (dark and in colour) saves as a webp in Chrome. And this is because the image is huge and benefits from webp compression. Webp compression can reduce image sizes by up to 50%, and for some of my test images was reducing a 30MB attachment to a 17mb attachment.
Yup, Cloudflare polished it and converted it from a jpeg that was 179KB to a webp that is now 156KB.
Over threads like this photography one, this process spares your browser of downloading an extra 1-2MB per page. It is significant enough not to be turned off... and brings the bandwidth bill we face down enough to fall under Linodes inclusive bandwidth (we do not pay for bandwidth even though we have so much traffic as we're just under the billing threshold thanks to this and another optimisation).
The second image... that downloads as a jpeg on Chrome. Why?
cf-polished: origSize=63077, status=webp_bigger
In the case of the second image, jpeg file is smaller than the webp... so we carry on using jpeg.
Is it possible to bypass the webp? Yes!
The jpegs are converted to webp within the Cloudflare cache, and the simple way to get the jpeg is to trigger a cache miss... and this can be done by simply opening the image in a new tab and adding a random querystring to the URI, i.e. https://lfgss.microcosm.app/api/v1/files/41b1f05b914d54e22f7df74ff6d957dbee69db2f.jpg becomes https://lfgss.microcosm.app/api/v1/files/41b1f05b914d54e22f7df74ff6d957dbee69db2f.jpg?hello=7865. That ?hello=7865 triggers a cache miss.
So the first image (dark and in colour) saves as a webp in Chrome. And this is because the image is huge and benefits from webp compression. Webp compression can reduce image sizes by up to 50%, and for some of my test images was reducing a 30MB attachment to a 17mb attachment.
That first image has this header:
Yup, Cloudflare polished it and converted it from a jpeg that was 179KB to a webp that is now 156KB.
Over threads like this photography one, this process spares your browser of downloading an extra 1-2MB per page. It is significant enough not to be turned off... and brings the bandwidth bill we face down enough to fall under Linodes inclusive bandwidth (we do not pay for bandwidth even though we have so much traffic as we're just under the billing threshold thanks to this and another optimisation).
The second image... that downloads as a jpeg on Chrome. Why?
In the case of the second image, jpeg file is smaller than the webp... so we carry on using jpeg.
Is it possible to bypass the webp? Yes!
The jpegs are converted to webp within the Cloudflare cache, and the simple way to get the jpeg is to trigger a cache miss... and this can be done by simply opening the image in a new tab and adding a random querystring to the URI, i.e.
https://lfgss.microcosm.app/api/v1/files/41b1f05b914d54e22f7df74ff6d957dbee69db2f.jpg
becomeshttps://lfgss.microcosm.app/api/v1/files/41b1f05b914d54e22f7df74ff6d957dbee69db2f.jpg?hello=7865
. That?hello=7865
triggers a cache miss.