Skip to content

Instantly share code, notes, and snippets.

@t-richards
Last active August 29, 2015 14:04
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 t-richards/f14bf9f777b655fb8c2d to your computer and use it in GitHub Desktop.
Save t-richards/f14bf9f777b655fb8c2d to your computer and use it in GitHub Desktop.
Wrapper for jpegoptim: Strips all markers from output file, force-overwrites original file.
#!/usr/bin/env bash
if [ $# -eq 0 ]
then
echo "Usage: optim <jpegfile(s)>"
exit
fi
for img in "$@"
do
jpegoptim -f --strip-all "$img"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment