Skip to content

Instantly share code, notes, and snippets.

@jcordeiro
Created April 10, 2015 01:45
Show Gist options
  • Save jcordeiro/61e516d41a6b34a42166 to your computer and use it in GitHub Desktop.
Save jcordeiro/61e516d41a6b34a42166 to your computer and use it in GitHub Desktop.
Loops through a directory of .png files and uses pngquant to optimize them and shrink their size
#!/bin/bash
for PNG in $(find . -name '*.png'); do
pngquant -ext .png -force 256 ${PNG}
echo "Optimized PNG: ${PNG}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment