Skip to content

Instantly share code, notes, and snippets.

@mvanduijker
Created August 29, 2017 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvanduijker/138ee8958f0e3c9627d93004731a7475 to your computer and use it in GitHub Desktop.
Save mvanduijker/138ee8958f0e3c9627d93004731a7475 to your computer and use it in GitHub Desktop.
google page speed jpeg optimisation
#!/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