Optimize jpg with Jpegtran

Install Jpegtran:

$ apt-get install libjpeg-progs

Convert one file to Progressive JPEG and optimize with Jpegtran:

$ jpegtran -progressive -optimize -outfile image.jpg image.jpg

Convert all files to Progressive JPEG and optimize with Jpegtran:

$ find /the/image/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *