Created
December 4, 2021 23:53
-
-
Save batosai/b787860aad64022ace2b40189e3817f2 to your computer and use it in GitHub Desktop.
bash script for optim image jpg and png. pngquant and jpegoptim are required
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
echo "\n \033[32m ###################### PNG ###################### \033[0m \n" | |
find './assets/build' -iname '*.png' -exec pngquant --verbose --ext .png --force 256 --strip {} \; | |
# find './build' -iname "*.png" -exec optipng -o5 -strip all {} \; | |
echo "\n \033[32m ###################### JPG ###################### \033[0m \n" | |
find './assets/build' -iname "*.jpeg" -exec jpegoptim -m80 --all-progressive --strip-all {} \; | |
find './assets/build' -iname "*.jpg" -exec jpegoptim -m80 --all-progressive --strip-all {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment