Sudo cp jpeg-recompress /usr/bin/jpeg-recompress Install jpeg-recompress with these commands, make sure you have the bzip2 package. Sudo apt-get install build-essential autoconf pkg-config nasm libtool git gettext libjpeg-dev -yīuild mozjpeg, the latest tar.gz can be found here which you can replace below in the wget line. Install mozjpeg dependencies first sudo apt-get update New size is 21% of original (saved 5073 kb)Ĭheck the initial size of your image folder du -sh foldernameįor example, before optimization the folder was 18 GB 18G uploads Optimize JPG Lossy Linux with jpeg-recompress Overall 5073 kilobytes were saved □ Metadata size is 20kbįinal optimized smallfry at q=87: 100.375671 Jpeg-recompress does some test compressions and analyses to see if the quality difference is noticeable before choosing an appropriate size. I performed this lossy compression with jpeg-compress jpeg-recompress -quality medium -method smallfry -min 40 hires.jpg hires.jpg Optimized it is 1 MB, ~ 20% of its original size! I chose this sunset image, the original image was 6.3 MB. If you want to get a batch of test images you can find some here Test images here. In this guide I am batch optimizing 37000 images on an Ubuntu 16.04 Linux VPS from Vultr.īack up your images first before attempting any optimizations! This guide will show you how to batch optimize JPG images using lossy compression with jpeg-recompress from jpeg-archive on Linux. Optimizing your images can feel like black magic sometimes. The safest JPG compression is lossless meaning no quality loss ( guide), lossy compression has far superior space savings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |