14 Best Free and Open Source Command-Line Image Compression Tools

Data compression is the process of storing data in a format that uses less space than the original representation would use. Compressing data can be very useful particularly in the field of communications as it enables devices to transmit or store data in fewer bits. Besides reducing transmission bandwidth, compression increases the amount of information that can be stored on a hard disk drive or other storage device.

There are 2 main types of compression. Lossy compression is a data encoding method which reduces a file by discarding certain information. When the file is uncompressed, not all of the original information will be recovered. Lossy compression is typically used to compress video, audio and images, as well as internet telephony. The fact that information is lost during compression will often be unnoticeable to most users. Lossy compression techniques are used in all DVDs, Blu-ray discs, and most multimedia available on the internet.

Images take up massive amounts of internet bandwidth because they often have large file sizes. They are the most popular resource type on the web. According to the HTTP Archive, 60% of the data transferred to fetch a web page is images composed of JPEGs, PNGs and GIFs. 45% of the images seen on sites crawled by HTTP Archive are JPEGs.

JPEG is an image file format that’s been around since the early 1990s, and it uses lossy compression. Its best suited for photographs or images with a number of color regions. Ever since its introduction, we’ve seen improvements to its compression algorithms seeking to reduce file sizes, improve quality, and speed up encoding time.

Is your image collection consuming an inordinate amount of space? You’ve probably already identified and removed duplicate images from your collection. Whether you keep your collection stored locally and/or in the cloud, you’ll probably need to take further steps to prune the size of your photographs. While it’s relatively cheap to store your files on the cloud, especially when you use an infrequent access storage class, your monthly outlay can start to mount up when storing many thousands of photographs. Any compression software which allows you to minimize your outgoings is definitely worthy of investigation.

To provide an insight into the quality of software that is available, we have compiled our recommended commnand-line image compression tools. All of these tools are released under a freely distributable license. Here’s our verdict.

Ratings chart

Let’s explore the 14 compression tools at hand. For each application we have compiled its own portal page, a full description with an in-depth analysis of its features, together with links to relevant resources.

Console Based Image Compression Tools
MozJPEGMozilla JPEG Encoder Project
GuetzliPerceptual JPEG encoder with excellent compression density at high quality
pngquantUtility and a library for lossy compression of PNG images
OxipngMultithreaded PNG optimizer, forked from Optipng
libjxlReference implementation of JPEG XL
zopflipngPNG optimisation tool using zopfli
CrunchLossy PNG image file optimization
libjpeg-turboJPEG image codec
QOIThe Quite OK Image Format
pngcrushOptimizer for PNG files
jpegoptimOptimize JPEG files. Lossless and lossy compression available
YOGAYummy Optimizer for Gorgeous Assets
OptiPNGAdvanced PNG optimizer
optimiztCLI image optimization tool

This article has been revamped in line with our recent announcement.

Best Free and Open Source SoftwareRead our complete collection of recommended free and open source software. Our curated compilation covers all categories of software.

The software collection forms part of our series of informative articles for Linux enthusiasts. There are hundreds of in-depth reviews, open source alternatives to proprietary software from large corporations like Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

There are also fun things to try, hardware, free programming books and tutorials, and much more.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments