Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jpegtran whole directory

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 {} {} \; 
like image 369
Bas Avatar asked Apr 05 '13 13:04

Bas


1 Answers

Answer:

find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \;
like image 78
Bas Avatar answered Sep 23 '22 10:09

Bas