For iOS development what image sizes do I need?

Hey folks,

So I’m working on my first iOS project and I’m getting a little tripped up on how I should approach image sizes.

I want to support everything from iPhone 5 and upwards.

I also want to support to support iPads, from the charts I’ve looked at these are categorised as simply iPad and iPad Retina which includes, iPad, iPad 2, iPad Mini, iPad air and iPad Mini Retina.

For the iPads this seems to only require two resolutions 1024 x 768 and 2048 x 1536 both of which have an aspect ratio of 4:3.

The iPhones have a larger range of resolutions, 640x1136, 750x1334, 1125x2001 and 1242x2208. These all have an aspect ratio of 16:9.

So the questions I’m trying to answer are:

How many versions of a single asset will I need?

For example, let’s say I have an image that I want to fill exactly half the width of the screen. I’ve got several resolutions and two aspect ratios to account for, so how many resolutions will I need to create this asset in?

So putting the various resolutions aside for a moment, I’ve also read some documentation that suggests various image sizes are required to support 1x, 2x and 3x scale factor. The example given is that if we have an image at 1x which is 10x10 pixels then the 2x version would be 20x20 pixels and the 3x version would be 30x30 pixels.

Are these variants required for every image?

And if so what does that mean for an image that’s full size?

For example a background image that spans the width of a full display, in the case of the iPhone 7 plus that would be 1242x2208, so do I need a x2 and x3 version of that?

And if so how does that scale down for smaller phones?

Hey William,

You’ve probably ran across most of this already but the thing about iPhones and their Retina Display is that their PPI (Pixels Per Inch) are ridiculously high… so the thought process is that if you design an app for iPhone 5 and upwards and use a 50x50 image on the iPhone 5, for example, if someone opens that image on an iPhone 7 Plus you’re going to have a nasty quality loss because your app and all of its assets scale to fit the screen size of the phone it’s running on.

I would recommend adding all of the size variants for every image you use (I use an app called Sketch that does an awesome job of exporting and managing this for me. You can actually download a Free Trial). I’ve only worked with .png files but there are vector options you can turn to (no loss in quality on upscale) but the 1x, 2x, 3x is really just there for the phone to decide the image resolution to use based on the environment, if that makes sense.

For a full size image, use your discretion. In Xcode, preview your app on all the phone simulators and see if the image looks alright. Is it just a background gradient and can I sacrifice some quality loss? How large is the image file? Should I downscale for smaller phones? Keep in mind larger images affect phone memory, app size, and app performance.

In regards to downscaling to smaller phones, you don’t have to worry about that. You don’t normally run into quality loss issues when downscaling unless you’re talking about downscaling, saving, then upscaling again… which I think is a completely different topic.

Hope this provides some insight.