Created
August 29, 2017 12:08
-
-
Save mvanduijker/138ee8958f0e3c9627d93004731a7475 to your computer and use it in GitHub Desktop.
google page speed jpeg 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
#!/bin/bash | |
# First stage: strip all comments, this will ALWAYS reduce size | |
jpegoptim --max=85 --strip-all --strip-com --strip-exif --strip-iptc --strip-icc $1 | |
# Second stage: do an progressive scan apart which may produce bigger images in some scenarios | |
jpegoptim --all-progressive $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment