Skip to content

Instantly share code, notes, and snippets.

@remi
Created October 3, 2013 19:04
Show Gist options
  • Save remi/6815229 to your computer and use it in GitHub Desktop.
Save remi/6815229 to your computer and use it in GitHub Desktop.
ImageOptim + ImageAlpha via commandline

Installation

Install binaries

Most of them are available through Homebrew.

$ brew install advancecomp gifsicle jhead jpegoptim jpeg optipng pngcrush

pngout is free to use but not to redistribute. We must download and install it manually from its author’s website.

$ wget http://static.jonof.id.au/dl/kenutils/pngout-20130221-darwin.tar.gz
$ tar -xzf pngout-20130221-darwin.tar.tar.gz
$ cp pngout-20130221-darwin/pngout /usr/local/bin

Install gem

$ gem install image_optim

Usage

$ cd /path/to/images
$ image_optim *.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment