Created
May 7, 2019 07:21
-
-
Save IlyaZha/54e7d9e0c090e05a37d0b2c3abe0392d to your computer and use it in GitHub Desktop.
Image Optimisation
This file contains hidden or 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
find ./ -name "*.jpg" -size +600k -printf '%p %s ' //find images bigger than 600Kb | |
find ./ -name "*.jpg" -size +800k -exec convert -resize 1920x {} {} \; //resize images | |
find ./ -name "*.jpg" -size -330k -exec jpegoptim --all-progressive --strip-all '{}' \; //progressive optimization | |
find ./ -name "*.jpg" -size +330k -exec jpegoptim -S 330K --all-progressive --strip-all '{}' \; //max size 330K |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment