DEV Community

Dhimas Kirana
Dhimas Kirana

Posted on

Best Compress Images or Photos on Ubuntu Linux

Hello, dev.. 👋

In this tutorial, I want to share tools for compressing images so that the file size is not large without reducing the quality of the image.

This tool is command-line based, so it is quite easy to use, especially for those of you who like the command-line interface.

The name of the tool we will use is jpegoptim.

Install jpegoptim

Open your Ubuntu terminal, type the following command

sudo apt-get install jpegoptim
Enter fullscreen mode Exit fullscreen mode

How to use

Go to the folder where you saved the image, type the following command

jpegoptim *.jpg
Enter fullscreen mode Exit fullscreen mode

So the results are as follows. Please note, that every time you carry out a compression command, the automation will overwrite or overwrite the original file.

jpegoptim result

Good luck 🍻

Top comments (0)