Last Updated on July 22, 2020
Summary
All three tools are CLI based. Why do we advocate CLI tools so strongly? It’s partly because of the availability of batch processing. For example, let’s say your photo collection is stored in ~/Photos/ with many sub-directories. You can process all the images with a single shell command ran from the Photos directory.
$ find . -name "*.jpg" -exec bash -c 'file="{}"; guetzli --quality 84 "$file" "${file/%ext/out}"' \;
The example command uses Guetzli, but you can easily adapt it for the other tools.
Guetzli
Guetzli offers excellent compression and excellent quality output but makes a huge sacrifice in terms of encoding time. Even if you have a powerful PC with lots of cores, you’ll need copious amounts of RAM to encode multiple images simultaneously.
Guetzli doesn’t support progressive image loading (where images load from blurry to sharp, instead of top to bottom) and only supports sRGB.
There is a third-party GUI available for Guetzli which uses Qt, but this has few followers.
Website: https://github.com/google/guetzli
Support: Qt based GUI
Developer: Google
License: Apache License 2.0
MozJPEG
MozJPEG is our recommended JPEG encoder. Like Guetzli it offers perfect backward compatibility with JPEG files, offers excellent compression ratios without taking a year and a day to compress files. It strikes a perfect balance.
Website: github.com/mozilla/mozjpeg
Support:
Developer: Mozilla
License: IJG (Independent JPEG Group) License, Modified (3-clause) BSD License, zlib License
Lepton
Lepton is a fully streamable format, meaning the decompression can be applied to any file as that file is being transferred over the network. It provides lossless, bit-exact storage for any type of photo, for archival purposes or for serving live.
Lepton is excellent at compressing large images. It offers good compression ratios together with blindingly fast encoding. But you cannot view images without the software which can be inconvenient. But if you insist on lossless compression, it’s the best JPEG tool available.
Website: github.com/dropbox/lepton
Support: Blog
Developer: Dropbox
License: Apache License 2.0
There are other good open source JPEG encoders including libjpeg, libjpeg-turbo, and jpegoptim.
Pages in this article:
Page 1 – Introduction / Installation
Page 2 – Guetzli – Compression chart
Page 3 – Guetzli – Time chart
Page 4 – MozJPEG – Compression chart
Page 5 – MozJPEG – Time chart
Page 6 – Lepton – Compression chart
Page 7 – Lepton – Time chart
Page 8 – Summary
| Explore Linux | |
|---|---|
| Best Free and Open Source Software - A huge collection of recommended free and open source software covering every major category. | |
| In-depth Linux Software Reviews - Detailed assessments of Linux software covering features, usability and overall quality. | |
| The Big List of Active Linux Distros - An extensive collection of actively developed Linux distributions. | |
| Open Source Alternatives - Alternatives to software and services from Google, Microsoft, Apple, Adobe, IBM, Autodesk, Oracle and others. | |
| Essential Linux System Tools - Indispensable utilities for monitoring, maintaining and managing Linux systems. | |
| Linux Productivity Tools - Useful utilities for improving productivity and streamlining everyday tasks. | |
| Alternatives to Popular CLI Tools - Modern alternatives to familiar command-line utilities supplied with Linux systems. | |
| Awesome Free Linux Game Tools - Tools, utilities and companion software that improve gaming on Linux. | |
| Machine Learning on Linux - Machine learning and deep learning software, self-hosted applications and practical tools. | |
| Saving Money with Linux - Practical ways to reduce electricity consumption and lower computing costs with Linux. | |
| Linux Candy - Fun, entertaining and sometimes delightfully quirky software from the lighter side of Linux. | |

Please read our Comment Policy before commenting.
According to the tests I made some years ago to be able to store efficiently invoices and other enterprise documents scans into a document management software without artifacts, even on very small letters, tests that I also extended to web sites pictures processing, here is what I found :
using GIMP as the graphic manipulation program with a :
* progressive .jpg encoding for slow connections enabled,
* 4:4:4 Subsampling method,
* Floating-point for the DCT method,
* only exif data kept (no thumbnail or other orientation/dimensions system)
*** and the most important feature : image colors indexed into a 256 colors optimized palette,
the threshold not to cross to be absolutely sure there will be no artifacts in the final picture, nor color problems (except, of course, with gradations, that do not fit in this process) is : 65 %.
My 2¢