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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay