skip to Main Content

Can we skip placing image in 1x, 2x but only placing in 3x Assets.xcassets, for app size optimization purpose?

In order to increase sales, we plan to place a high number of high resolution screenshot images, within our app.

However, we do not want to increase our app size significantly.

This is our plan

  1. We will place high resolution 750×1334 screenshot (Captured via iPhone SE simulator) over the Internet
  2. We will place a scale down low resolution 150×267 image, in Assets.xcassets, under 3x category

enter image description here

  1. We will then use the following image loading library, to show the image

imageView.kf.setImage(
    with: URL(string: "https://raw.githubusercontent.com/yccheok/wenote.jstock.co/master/ios/color_custom.png"),
    placeholder: UIImage(named: "color_custom")
)

User will then observe a blur image for few seconds (If he has a good internet connection), then the image will transit to a crystal clear image.

For the above use case, I was wondering, is it OK to leave 2x & 1x category as blank? Is there any side effect, of leaving 2x and 1x category blank?

Or, should I place the 1 and only 1 image, in 1x category?

Thanks.

2

Answers


  1. enter image description herefor this specific purpose ( when you have only one image , not for icons ) , you can use single scale like this

    Login or Signup to reply.
  2. Depending on the size of your images, it may be alright to just bundle 3x images. They get scaled on 2x and 1x devices automatically (I’m not sure whether there are still any 1x devices that are supported by current Xcode versions; also depends on your deployment target).

    In any case, look at the output on an actual 2x device, if you can, and decide whether the quality loss due to scaling is acceptable. Straight lines may look slightly blurry and depending on the image, this may be acceptable or not.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search