jpegoptim, lossless JPG optimisation from the command line
Ten to fifteen percent smaller files with identical quality.
- Answers
- How much smaller does jpegoptim make JPG files without quality loss?
- Topics
- cloud · data · howto · networking · programming · server · web · webdesign · work
- Full article on willem.com
- https://willem.com/en/2018-09-26_optimising-images-for-the-web-and-performance/
Summary
On average 10 to 15 percent, without loss of image quality. jpegoptim shrinks JPG files from the command line by optimising the internal Huffman tables, which improves how well the existing compression performs.
Full text
Images, not scripts, make up most of an average web page's weight, so image optimisation is where site speed is won. For photos JPG is the right starting point; for logos, graphs and slides with few colours, PNG. jpegoptim rewrites the internal Huffman tables of a JPG, which typically saves 10 to 15 percent with zero quality loss because nothing about the actual image data changes. Photoshop's Save for the web gives a reasonably optimised JPG too, online services like TinyJPG and ImageOptim do the same, and WordPress sites can automate it with a plugin such as Imagify. On my servers the command line tool is what fits an automated pipeline.