Centmin Mod based Nginx server has Nginx PageSpeed module integrated. By default, Centmin Mod Nginx PageSpeed disables the PageSpeed rewrite_images filter to lower the incurred server resource overhead that Nginx PageSpeed has when enabled.
For the purpose of testing, I decided to re-enable the Nginx PageSpeed rewrite_images filter along with a few other image optimisation related filters including automatic conversion of images to new Google webp format if the image is deemed to benefit from the conversion.
Nginx PageSpeed will:
- Automatically calculate if there is any benefit in terms of image file size. If there is no benefit, Nginx PageSpeed will not convert to webp format.
- Only serve the rewritten webp format image to browsers which support webp. Non supported browsers will get the original image instead.