News for hackers. Stuff that matters.
Re:Image optimization decreased website's page weight by 62% by tialaramex on Monday July 16, 2018 @09:33AM (#17541125)
For PNG it absolutely does depend on the tool.

Here's why: PNG has a pre-processing step to turn pixel data into bytes, then a general purpose compressor is used on the bytes. The algorithm used is picked per row, and if you pick the right one the compressor will have a better shot at small output, but which algorithm is best for each row of your image?

The popular libpng reference implementation contains a weak heuristic to pick algorithms that might do well, but a tool can do much better... Or it can do much worse. Early PNG support in Adobe Photoshop just picked "do nothing" for every row, resulting in huge PNG files.

Re:Image optimization decreased website's page weight by 62% by snowwrestler on Monday July 16, 2018 @09:57AM (#17541261)
Interesting... can you ballpark the percent improvement folks would expect to see between the most well-known image tools or libraries available now?
Re:Image optimization decreased website's page weight by 62% by fps_doug on Monday July 16, 2018 @10:09AM (#17541331)
I suggest you just try running optipng on some random PNG files you have on your HDD. Results vary greatly, but I've seen savings between 10 and 20% on files coming from GIMP where I always set the compression to 9 (maximum). I never touched Photoshop in my life so no idea what you can tune there and what its defaults are, but general experience shows that a lot of people either just don't bother and go with the defaults, or go all crazy clicking and manipulationg everything without knowng what's going on.

I agree with you that for JPEG there is no silver bullet, but like that other comment here suggests, you could perfectly just run optipng on max settings in a cronjob and call it a day, because you know there will be absolutely no quality loss if you don't explicitly request it.

Re:Image optimization decreased website's page weight by 62% by MaxBarraclough on Monday July 16, 2018 @10:11AM (#17541346)
Here's a blog post that compares them. Apparently the difference can be pretty extreme:

http://daleswanson.blogspot.com/2013/08/a-comparison-of-png-...