One of the problems that we can find with the images is their weight. It is clear that there will be photos that we want to save with the highest possible quality, but there are many occasions when this is not necessary. The problem when we want to lower the quality of an image is that we do not know how much we can download it without being too noticeable, but this problem can be solved with imgmin.
imgmin is a project that aims to solve the mentioned problem. As I would do it? Well calculating mathematically and automatically how much can be lowered the weight of an image without it being noticed that we have edited it. Best of all, users will only have to use one command for this little tool to do all the work for us. Here we tell you everything you need to know.
imgmin is the result of extensive research work. Use a mechanism no loss of quality (lossless) to generate optimized images by manipulating blocks of pixels. Here we explain how to install it.
Installing and using imgmin
To install imgmin we just have to open a terminal window and type the following commands:
sudo apt-get install -y autoconf libmagickwand-dev pngnq pngcrush pngquant git clone https://github.com/rflynn/imgmin.git cd imgmin autoreconf -fi ./configure make sudo make install
Using this little tool couldn't be simpler. What we have to do is use the following command:
imgmin original.jpg optimizada.jpg
Of course, I think it is important to explain that you have to enter the full path of each image. An easy way to solve this is to leave the photo on the desktop, open the terminal, enter the Desktop folder (in my case it is using the command cd Desk) and then already enter the command. Logically, we will have to change the names "original" and "optimized" by the name of the image to which we want to lower its weight and that of the output image.
If you have tried it, what do you think of imgmin?
Has it worked for you on Ubuntu 16.04? It gives me an error when doing make:
"Imgmin.c: 30: 29: fatal error: wand / MagickWand.h: There is no such file or directory"
I think I have installed all the prerequisites
@ leillo1975 The exact same thing happens to me 🙁