Sirv applies PNG optimization by default, to dramatically reduce the file size of your PNG images.
By default, your images will be served using 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.
To force an image to be always served as PNG to all browsers, set 'format' to 'png':
'png.optimize' lets you control PNG optimization with either true/false or 1/0. By default, PNG optimization is enabled for the optimal format (default) 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:
PNG optimization dramatically speeds up delivery of your images, though it takes slightly longer to process than a JPEG image. Sirv performs up to 20 passes to find the best optimizations possible. The first viewer may experience a short delay (typically 0.15 to 1.00 second) before the image is served to them. Processed images are cached and immediately available for future viewers.
The first person to view an image won't notice a delay when viewing just one PNG but it might be noticeable to the first person viewing a 360 spin of PNGs, because spins usually consist of 36 images or more.
Compare the unoptimized image to the left (80 KB) against the optimized image to the right (only 20 KB):