Tag Archives: image optimization linux

How to optimize image online in Linux?


Online image optimization in Linux:

Image compression may have an interest in many situations. For example, while writing a web article in which we need compressed images to reduce the total weight of a web page. Image compression may also need while sending an email. For this it is worthwhile to know how to do it quickly from command line. So here we will see how to lighten images in PNG, JPEG/JPG format with various tools.

PNG images optimization with pngcrush

First we need install pngcrush, in Debian we will use the below command:

For CentOS and RHEL, use this syntax:

Once installed, pngcrush is very easy to use, for example:

Here, “-brute” allows us better optimization of the image, “-e” compress the original image (Note: after specifying “-e” mention the name for compressed image which will be the output of the tool). read more