Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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