Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop using retina-only images

What will happen if I do the following:

  • I substitute all non-retina assets with the retina assets
  • I delete all retina assets in my project ( All the [email protected]s etc.)

Why do I want to do this:

  1. There will be less and less non-retina iPhones in the future (also due to minimal OS requirements etc.)
  2. I get a lighter binary
  3. I don't have so many "quasi-duplicate" files in my project which I have to maintain separately.

Now:

  1. Will the iPhone 3GS scale down the image and display it properly (with a little bit of processing overhead of course)
  2. Will a "retina-enabled" Phone be able to display the image properly even though it does no longer have the @2x suffix in the filename.
like image 536
Besi Avatar asked Jan 16 '12 14:01

Besi


1 Answers

In 99% of cases this will work fine. However there are cases where images won't scale correctly (usually depending on the contentMode). I worked with someone who did this exact thing and never noticed a problem, although I think it is terrible practice.

You will get a lighter binary, but you are asking the older devices (with less memory) to do more work. If you don't want to support these devices then don't, I think this is better than giving users a potentially broken app.

There are better ways to reduce the size of images in your app, reusing them wherever possible, stretching, tiling etc.

like image 71
James P Avatar answered Sep 18 '22 03:09

James P