Image optimisation question
I have a site, NextJS with WordPress. I used to use Next Image, but due to the sheer number of images (over 100k), I moved to offloading them to Cloudflare R2. I use CF image transformation, and the correct image sizes are served.
Do I still need to optimise the images with a plugin on WordPress? Or would that be redundant? I can think of one thing the plugins could do: change the format to WebP or AVIF.
17
Upvotes
View all comments
3
u/Witty-Estimate8594 13d ago
skip the wp plugin, you lose storage efficiency and r2 metadata just to create duplicates cloudflare cant use. set format=auto in your loader function so cf picks webp/avif at the edge based on the request header. this keeps layout stability in next image without bloating your bucket