ImageOptim-CLI
Controls ImageOptim and ImageAlpha to make lossless optimisation of images part of your automated build process.
Example
$ imageOptim --directory /path/to/images
Processing 23 images...
✔ Finished in 212 seconds
Installation
$ sudo npm install -g imageoptim-cli
Usage
Usage: imageOptim [options]
Options:
-d, --directory directory of images to process
-a, --image-alpha pre-process PNGs with ImageAlpha.app (http://pngmini.com)
-h, --help output usage information
-v, --version output the version number
Grunt Plugin
JamieMason/grunt-imageoptim is the Grunt plugin for imageoptim-cli.
Credits
ImageOptim-CLI is the work of Jamie Mason and James Stout. It extends PorneL's brilliant ImageOptim GUI Application for the Mac.
Similar Tools
Another web optimisation tool is JamieMason/Unreadable, a CSS-aware HTML minifier and optimizer for the command line.