Skip to content

Instantly share code, notes, and snippets.

@longwave
Created March 11, 2014 10:14
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save longwave/9482947 to your computer and use it in GitHub Desktop.
Save longwave/9482947 to your computer and use it in GitHub Desktop.
Optimize PNG files in place, with pngcrush and optipng
#!/bin/sh
for i in `find . -name "*.png"`; do
pngcrush -e .png2 -rem allb -brute -reduce $i
mv ${i}2 $i
optipng -o7 $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment