I have written about using lossless optimisations techniques to reduce the size of images before, but I recently learned of a few other tools to further reduce the size of PNG images.
optipng -o9 image.png
Removing unnecessary chunks
pngcrush -q -rem gAMA -rem alla -rem text image.png image.crushed.png
Depending on the software used to produce the original PNG file, this can yield significant savings so I usually start with this.
Reducing the colour palette
When optimising images uploaded by users, it’s not possible to know whether or not the palette size can be reduced without too much quality degradation. On the other hand, if you are optimising your own images, it might be worth trying this lossy optimisation technique.
pngnq -f -n 32 -s 3 image.png
Re-compressing final image
Most PNG writers use zlib to compress the final output but it turns out that there are better algorithms to do this.
advpng -z -4 image.png
When the source image is an SVG
Another thing I noticed while optimising PNG files is that rendering a PNG of the right size straight from an SVG file produces a smaller result than exporting a large PNG from that same SVG and then resizing the PNG to smaller sizes.
Here’s how you can use Inkscape to generate an 80×80 PNG:
inkscape --without-gui --export-width=80 --export-height=80 --export-png=80.png image.svg