I want to optimize the whole test folder with jpg images from a command line. I found this but it doesn't work:
cd /home/site/html/update/test/
find . -exec jpegtran -optimize "{}" "{}.opti.jpg" "{}" \;
I want to overwrite the existing images.
Suggestions?
Answer:
find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \;
Answer:
find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With