Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Make optimisation of images part of your automated build process
Shell AppleScript JavaScript
Pull request Compare This branch is 256 commits behind master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A Command Line version of ImageOptim for the Mac.

ImageOptim-CLI is a Shell Script which controls the same underlying executables as found in


$ imageOptim /path/to/images


 FILE                                               KB REMOVED  % REMOVED
 test/animated.gif                                3,689.165 KB     75.00%
 test/faustino-asprilla.jpg                           2.149 KB      1.00%
 test/tux.png                                         2.892 KB      6.00%
 TOTAL                                            3,694.206 KB     73.00%

Similar Projects

Similar projects exist such as toy/image_optim so check that out as well.

The main differences in ImageOptim-CLI are;

  1. it does not require you to install each of the optimisation tools yourself.
  2. it does not depend on Ruby, it's just Shell.
  3. it is new, and is still not yet stable.

Another web optimisation tool is JamieMason/Unreadable, an intelligent, CSS-aware HTML minifier and optimizer for the command line.

Please Contribute

I'm a JavaScript Developer who is fairly new to Shell, forks & contributions are welcomed.

Known Issues

Paths containing spaces are not yet properly handled.

Something went wrong with that request. Please try again.