When we need to download an image from some URL and show it on two kinds of devices — Retina (with 2x image) and regular device — Should we have two different image URLs to handle this?
For the images in the resource bundle we are keeping both xyz.png and xyz@2x.png and its working fine.
For images we are fetching from server do we need to have separate image URLs for both these kind of images and cache them locally with the same naming convention (xyz.png and xyz@2x.png)?
Please throw some light here.
You can check if the device has a high-resolution retina display and based on that download a different image. Don’t bother for photos and stuff that you’d scale anyway for interface size.
You can create the scaled version of the downloaded image with
Keep in mind that a scaled 100×100 image will become a 50×50 points image (with 2.0 scale).
Check first if you have a retina display