One Weird Trick to Lose Size
Ben Sandofsky

Back in 2012, before I started at Apple, a friend and I built Fun Folds – a photo manipulation app – which supported iPhone, iPod touch and iPad, all at both Standard and Retina screen resolutions. We even supported 8 languages, including Chinese with its own localised app name/logo. Unoptimised the app weighed 12MB but after optimising images only it weighed a miniscule 3.5MB. And this was back in the days before App Thinning, Asset Catalogs and LLVM Bytecode.

For transparent PNGs I used ImageAlpha to reduce the bit-depth, the reasoning being that by reducing the number of colours in a PNG to just enough to represent the contents – rather than the overkill of millions of colours – you’ll enable better compression gains. I then ran these smaller indexed-colour transparent PNGs through ImageOptim (which does pngcrush and more) to get the best compression for each image. These two steps gave huge optimisation gains.

For JPG I used the JPGmini desktop app to reduce the size of photos with no perceptible loss of visual quality.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.