Optimage

Usage

Just choose image files or folders to process in Optimage.

Preferences

Command line usage

You may run Optimage in interactive mode from command line by running the following command in Terminal.

open -a Optimage.app image-file …

or

/Applications/Optimage.app/Contents/MacOS/Optimage image-file …

There is also a CLI client in the package. If you installed Optimage to the default folder, it's located under /Applications/Optimage.app/Contents/MacOS/cli/optimage. You can create a soft link for faster access.

ln -s /path/to/cli/optimage /usr/local/bin

Usage examples:

Run lossy optimizations on a set of images.

optimage --lossy --srgb --strip-meta -v -- image-file …

Run lossy optimizations in parallel on all images in the folder.

find -E /path/to/image/folder -type f -iregex '.*\.(png|jpe?g)' -print0 | xargs -0 -I {} -P 8 optimage --lossy --srgb --strip-meta -v -- {}

or

find /path/to/image/folder -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \) -print0 | xargs -0 -I {} -P 8 optimage --lossy --srgb --strip-meta -v -- {}

Run optimage -h to get help. At present CLI supports only PNG and JPEG.