Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Make optimisation of images part of your automated build process
Shell AppleScript JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
environment
src
.gitignore
.npmignore
Gruntfile.js
README.md
package.json

README.md

ImageOptim-CLI

Automates batch image processing with ImageOptim, ImageAlpha, and JPEGmini for Mac to make lossless optimisation of images part of your automated build process.

Example

$ imageOptim --directory /path/to/images
  Processing 57 images...
  ✔ Finished in 54 seconds

You can see also a video screen recording of ImageOptim-CLI on YouTube.

Installation

$ 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)
  -j, --jpeg-mini     process JPGs with JPEGmini.app (https://itunes.apple.com/us/app/jpegmini/id498944723
  -q, --quit          quit ImageOptim.app when complete
  -h, --help          output usage information
  -e, --examples      output usage examples
  -v, --version       output the version number

Examples

Run ImageAlpha, ImageOptim & JPEGmini
$ imageOptim -j -a -d path/to/images
$ imageOptim --jpeg-mini --image-alpha --directory path/to/images

Run ImageAlpha & ImageOptim
$ imageOptim -a -d path/to/images
$ imageOptim --image-alpha --directory path/to/images

Run ImageOptim
$ imageOptim -d path/to/images
$ imageOptim --directory path/to/images

Run ImageAlpha, ImageOptim, JPEGmini & quit them when finished
$ imageOptim -j -q -a -d path/to/images
$ imageOptim --jpeg-mini --quit --image-alpha --directory path/to/images

Run ImageAlpha, ImageOptim & quit them when finished
$ imageOptim -q -a -d path/to/images
$ imageOptim --quit --image-alpha --directory path/to/images

Run ImageOptim & quit it when finished
$ imageOptim -q -d path/to/images
$ imageOptim --quit --directory path/to/images

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.

Something went wrong with that request. Please try again.