DEV Community

Ngobrolin IT
Ngobrolin IT

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)

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay