ImageOptim Macro

May 02, 2012 by Gabe | [mmd] |

From a recent Gruber link, ImageOptim optimizes images without dramatically changing the image quality. I did some testing and I can not see a difference in quality but the file sizes are typically 30-50% smaller.

I often feel guilty about the large images in some of my posts. I do little lightbox tweaks to only load a large version when it is clicked, but often I just scale the image down to 500px wide and embed it. ImageOptim might alleviate some of my guilt.

Of course, I needed to automate it.1 I have a macro palette just for image manipulation so I created an ImageOptim macro to use with it.

I select as many files as I like in the Finder and then trigger the macro. Each Image gets processed in turn. If ImageOptim is successful, there is nothing to report, but if there is an error, I get the full error message in a popup window.

I'd prefer if ImageOptim had a true CLI. Instead the shell command just opens the app with the indicated files. It does automatically process and save the new versions, but the application is left open as the frontmost window.

  1. ImageOptim provides a package for using it as a service. I do not like cluttering my services menu.