3 ms·
If you want better lossless compression you may want to try WebP, which is now supported by all modern browsers and offers better lossless compression than PNG.
by jansan 4y ago
If you want better lossless compression you may want to try WebP, which is now supported by all modern browsers and offers better lossless compression than PNG. For the example image I got 187kBytes compared to 267kBytes with PNG.
Can I use WebP: https://caniuse.com/webp https://caniuse.com/webp
WebP on Wikipedia: https://en.wikipedia.org/wiki/WebP https://en.wikipedia.org/wiki/WebP
- pmoriarty 4y agoUnfortunately WebP only supports 8-bit images. One of the main reasons I use PNG is that it can handle 16-bit images, so if I converted my archival 16-bit PNGs to WebP I'd lose data.
- pineconewarrior 4y agoWebP isn't perfect but it's fantastic for raster web graphics requiring transparency!
- dchest 4y agoIndeed! For one of the my images, which had lots of non-linear gradients and shadows (an app icon), an optimized (with the best algorithm using ImageOptim) 457 KB PNG got compressed to 36 KB WebP (lossless, of course).
- jeroenhd 4y agoJust for fun you can compare WebP vs PNG performance (in OxiPNG or your browser's implementation) on https://squoosh.app/ https://squoosh.app/. For your normal images this will quickly net your a 20-30% size decrease over optimized PNG even in lossless mode. JPEG XL is even better, but browsers and other image libraries tend not to support it.