Skip to content

Instantly share code, notes, and snippets.

@Stasevi4
Created May 10, 2014 23:35
Show Gist options
  • Save Stasevi4/7edfff578652a51318f4 to your computer and use it in GitHub Desktop.
Save Stasevi4/7edfff578652a51318f4 to your computer and use it in GitHub Desktop.
jpegtran
// jpegtran
$DIR=/path/to/folder
for file in $(find $DIR -type f \( -name "*.jpg" -or -name "*.jpeg" -or -name "*.JPG" \)); do
echo found $file for optimizing...
jpegtran -copy comments -optimize -progressive -outfile $file $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment