Optimage
Usage
To start optimization in Optimage, do any of the following:
- Drag and drop files or folders onto the main window.
- Click the Open button in the main window.
- Go to File > Open… in the main menu.
- Drop files or folders onto Optimage icon in the Dock.
- Select files or folders in Finder and choose Optimage from Services in the context menu.
Preferences
- Size – resize images and videos to the specified size maintaining the original aspect ratio.
- Format – convert images and videos to one of the supported formats.
- Frame Rate – adjust frame rate of videos and animations.
- Enable lossy compression – perform visually lossless (lossy) compression to achieve a good balance of quality and file size. Lossy compression works best on uncompressed images, and falls back to lossless compression when the original quality is too low. If unchecked, perform lossless compression, which preserves the original quality.
- Optimize color for sharing – convert images from an original color space to sRGB color space. Untagged images are assumed to be in sRGB color space.
- Remove color management information – strip any information about color space from images without changing color values.
- Remove personal information and metadata – strip personal information and hidden metadata from images including Exif, XMP, IPTC, GPS geotags, thumbnails and comments. Some critical auxiliary tags are preserved, e.g. 9-patch and APNG data.
- Destination – choose a destination folder for optimized files.
- Prefix and Suffix – add a prefix or suffix to output file names. Use the prefix to specify a relative subfolder for output files, e.g. add
../
to move one level up.
- Move original to Trash – move original files to the Trash where you can restore them later. You can also use this option to clean up unnecessary files when renaming.
- Preserve file modification time – preserve modification time on optimized files.
- Show warning before overwrite – prompt before permanently replacing original files.
- Exit when optimization complete – automatically exit the application when optimization is complete.
Command line usage
You can launch Optimage in interactive mode by running the following command in Terminal.
open -a Optimage image-file …
If you want to block the command execution until all images are optimized, use the following command.
open -W -n -a Optimage image-file … --args -exit YES
or
/Applications/Optimage.app/Contents/MacOS/Optimage -exit YES image-file …
You can easily get the command that matches your current Preferences with Copy Command in Edit menu. It is recommended to always launch a new app instance and block command execution because the command line options are not passed on reopening.
There is also a CLI client in the application bundle. If you have Optimage installed in the Applications folder, it is 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. Currently, the CLI supports only PNG and JPEG.