Last active
October 25, 2016 20:01
-
-
Save danrcoull/9f9dee782fc63901d8c8633332e8b57b to your computer and use it in GitHub Desktop.
bash Compress recursivly all images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd $1 | |
find . -iname '*.jp*g' -type f -print0 | xargs -0 jpegoptim -o --strip-all --max=80 | |
find . -iname '*.png' -type f -print0 | xargs -0 pngquant --quality=70-80 | |
find . -iname '*.png' -type f -print0 | xargs -0 optipng -o7 strip all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment