PNG optimization

On this page

Sirv applies PNG optimization by default, to dramatically reduce the file size of your PNG images.

Sirv automatically serves your images in the 'optimal' format, which will automatically serve your images as either WebP or optimized PNG, whichever is more efficient.

The amount of PNG optimization applied by Sirv depends on the image size. The smaller the image, the greater the optimization (in steps from 300x300, 500x500, 700x700, 900x900, 1200x1200). PNG images larger than 1500x1500 pixels are not optimized by default.

To force an image to be always served as PNG to all browsers, set format to png:

https://demo.sirv.com/look.jpg?format=png

format lets you control PNG optimization with true/false. By default, PNG optimization is enabled for the optimal format and disabled if format is set to a different value.

If you have changed the format value and wish to enable PNG optimization, set it to true, like so:

https://demo.sirv.com/look.jpg?format=png&png.optimize=true

Example image optimized PNG

PNG optimization dramatically speeds up delivery of your images. Sirv performs up to 20 passes to find the best possible optimizations. This optimization process is very fast, usually completing within 0.15 second. The optimized image is then cached and ready to serve to all for future viewers.

Compare the unoptimized image to the left (80 KB) against the optimized image to the right (only 20 KB):

Unoptimized PNG
Optimized PNG

Was this article helpful?

Get help from a Sirv expert

help ukraine help ukraine Powered by Ukrainian determination and British ingenuity

How can you support Ukraine