Created
March 1, 2018 01:10
-
-
Save aozimkov/7a1845201cf24e235e77402761ac3847 to your computer and use it in GitHub Desktop.
Images optimization script
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 | |
touch optipng.log | |
touch jpegoptim.log | |
echo `date` >> optipng.log | |
find . -iname '*.png' -print0 | xargs -0 optipng -o7 -log optipng.log -preserve | |
echo `date` >> jpegoptim.log | |
find . -iname '*.jpg' -print0 | xargs -0 jpegoptim --max=90 --preserve --totals >> jpegoptim.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment