Skip to content

Instantly share code, notes, and snippets.

View dashed's full-sized avatar
Vibing

Alberto Leal dashed

Vibing
View GitHub Profile
@dashed
dashed / optimize.sh
Created December 10, 2012 06:45 — forked from ryansully/optimize.sh
image optimization script (pngcrush & jpegtran)
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
for png in `find $1 -iname "*.png"`; do
echo "crushing $png ..."
pngcrush -rem alla -reduce -brute "$png" temp.png