Mac Gems: OptiPNG makes PNG files smaller without losing image quality

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

At a Glance
  • Generic Company Place Holder OptiPNG

Editor’s note: The following review is part of Macworld’s GemFest 2013. Every day (except Sunday) from mid-July until late September, the Macworld staff will use the Mac Gems blog to briefly cover a standout free or low-cost program. Learn more about GemFest in this Macworld podcast. You can view a list of this year’s apps, updated daily, on our handy GemFest page, and you can visit the Mac Gems homepage for past Mac Gems reviews.

Over at TidBITS, we use the PNG (portable network graphics) image format exclusively for our images. Sometimes, an image can be 1MB or larger, but since discovering OptiPNG 0.7.4, I’ve been able to substantially reduce those file sizes without any noticeable degradation of image quality.

While OptiPNG is a free, open-source utility, there’s a big catch: it’s a command-line utility, and you’ll have to compile it yourself.

Here’s how to get OptiPNG up and running.

  1. Download the compressed source code.
  2. Open the file, optipng-0.7.4.tar.gz in the Finder. It will create a folder called optipng-0.7.4.
  3. Open the Terminal, found under Applications -> Utilities.
  4. In the Terminal, type cd then drag the optipng-0.7.4 folder into the Terminal, and press Return on the keyboard. This puts you inside that directory.
  5. Type ./configure and press Return.
  6. Type sudo make install and press Return.

That wasn’t so bad, was it? Now to actually use OptiPNG, move to the directory where the images are, by using the cd command above, then type optipng and the name of the image you want to optimize. To make things easier, you can type just the first few letters of the command or image name and then press the Tab key to autocomplete. You can optimize every image in a directory by typing a single asterisk instead of an image name.

But there are easier ways to use OptiPNG. Because it’s a command-line app, you can use it in an AppleScript, Automator workflow, or set it up as a Folder Action, so images you drop into a certain folder will be automatically optimized.

In my experience, OptiPNG will reduce the image’s file size by 30 to 50 percent, which can be significant for larger images. For images shared over the Internet, which is most of them these days, running OptiPNG first is an easy way to speed up load times. While OptiPNG isn’t the easiest tool to use, it’s free, flexible, and indispensable for anyone who works with online images.

Want to stay up to date with the latest Gems? You can follow Mac Gems on Twitter or on You can also subscribe to the Mac Gems RSS feed.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
At a Glance
  • If you can handle the command-line interface, OptiPNG can drastically reduce a PNG's size without affecting image quality.

Shop Tech Products at Amazon