Quickly Optimize And Compress JPEG Images In Ubuntu

Share on FacebookShare on Google+Tweet about this on TwitterPin on PinterestShare on RedditPrint this page

When uploading images, it is a good idea to first optimize them thereby reducing the size. Doing this adds up quickly when using them for websites, blogs and so on.

An earlier article described RIOT – a freeware tool for Windows that serves this purpose.

Now, for Ubuntu, a simple command line tool optimizes jpeg images – jpegoptim.

Install it using the following command from Terminal :

sudo apt-get install jpegoptim

installing jpegoptim in Ubuntu

Once installed, using it is easy. To optimize a jpeg image, type the name of the file next to jpegoptim :

optimizing jpeg images in Ubuntu using jpegoptim

The output will show how much of the image size has been reduced.

There are various parameters that can be used when optimizing jpeg images. Suppose, an image needs to be compressed by a certain %, then to do this : the “–size=” parameter can be used.

optimizing jpg images by a certain % by using jpegoptim

Different options that can be used while optimizing can be viewed using the help parameter :

various parameters for jpegoptim

Happy optimizing!

Comments are closed.