Optimising images / Optimizing images

Tomato tomato. If you’re putting images into an application, especially a mobile application, or on the web, or anywhere, it’s a good idea to optimise them before you deploy. In an iOS application the larger your application is the longer it takes to download and install. If you go over the magic 20MB limit, users aren’t even allowed to download it over 3G; they have to seek out a WiFi network. This doesn’t feel like it would be good for sales.

Xcode runs pngcrush on your PNG files, which does an okay job. It doesn’t touch the JPGs, and overall it turns out you can do better.

Enter ImageOptim. A free Mac OS X app (unfortunately not available via the Mac App Store due to licensing) that combines a series of command-line image optimisation tools; runs them all and chooses the best optimisation for each image. It also finds images recursively in folders, so I dragged and dropped the root Images folder to do a whole application.

The optimisations are lossless, so it doesn’t downgrade the quality of your images (this is something you should also experiment with separately, especially JPEG quality). The tools remove metadata and other information that you don’t need; they can also recompress or optimise the compression to gain a few more bytes.

There’s one extra optimisation tool that ImageOptim can use but isn’t bundled: PNGOUT. There are instructions for downloading PNGOUT on the ImageOptim webpage. I recommend getting it and configuring the path to it in the ImageOptim preferences; it often got the best results on my PNGs.

Thanks to Corwin Derkatch for putting me on to ImageOptim.

This was posted 2 months ago. It has 3 notes.
  1. kim reblogged this from karlvr and added:
    Huh, never thought about that.
  2. karlvr posted this