How-to compress image jpeg on Linux ?

Example on Ubuntu

sudo apt install jpegoptim

compress by 90% with 4CPU with preserve permissions in same directory

find . -type f -iname "*.jpg" -print0 | xargs -0 -n 10 -P 4 jpegoptim -tp -m 90

compress by 90% with 4CPU with preserve permissions in dest directory

find . -type f -iname "*.jpg" -print0 | xargs -0 -n 10 -P 4 jpegoptim -tp -m 90 -d /temp/

Follow me on Mastodon FR Follow me on Mastodon EN

Subscribe RSS