Created
April 29, 2018 19:11
-
-
Save Iman/901000acda7dc41ab238313a4c69a557 to your computer and use it in GitHub Desktop.
Optimize JPEG and PNG
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
#!/usr/bin/env bash | |
#find /var/www/ -name "*.png" -print0 | xargs -0 sudo chmod +w *.png | |
find /var/www/ -name "*.png" -print0 | xargs -0 sudo optipng -o7 | |
#find /var/www/ -name "*.jpg" -print0 | xargs -0 sudo chmod +w *.jpg | |
find /var/www/ -name "*.jpg" -print0 | xargs -0 sudo jpegoptim -m 90 -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment