Webpagetest.org is a great tool to learn how the web browser works and how you can improve your website loading time (you should use it if you aren’t using it already).
Today after running a report I’ve seen that we had a large image on the home page that can be compressed to minimize loading time. Smaller images means faster pages, faster pages means happy users :).
To compress PNG images on Linux I’ve found two alternatives:
Pngcrush - Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline.
Its main purpose is to reduce the size of the PNG IDAT datastream by trying various compression levels an PNG filter methods. It also can be used to remove unwanted ancillary chunks, or to add certain chunks including gAMA, tRNS, iCCP, and textual chunks.
$ sudo yum --enablerepo=epel --enablerepo=rpmforge install optipng pngcrush
I’ve achieved 20% - 24% file size reduction after PNG compression, example usage:
$ optipng -o7 example.png $ pngcrush -brute -e ".compressed.png" *png
More on the subject: