Let me take us all on a little bit of a historical journey. It’s a great example to explain what all those numbers in config.lua mean.
In the beginning, there was the iPhone 3s., It was 320x480. Early Android devices were that size, but it didn’t take long for Android makers to start the pixel size competition. I believe the Motorola Droid was a 480x854 px device. But lets hold off on that for a moment. Apple came along with the iPhone 4/4s family which doubled the screen from 320x480 to 640x960. If you look at this config.lua:
width = 320, height = 480, scale = "letterbox", imageSuffix = { ["@2x"] = 2.0, },
Then your 1x images would show on the iPhone 3 family, your @2x suffixed images would show on the iPhone 4 family. But on the Droid, it’s 1.5x bigger in width. Since 480 is less than 2.0 X 320 (640), the Droid would use the 1x images and not the @2x images. With digital images any time you size up images they become soft and blurry. The more you size up the worse it gets. Sizing down tends to maintain sharpness. So with the Droid in this example, the image gets sized up 50%. Let’s look at another example. The first couple of versions of the Kindle Fire, were 600px x 1024px. With that config.lua, the Kindle Fire would still use the 1x image which would be scaled up 93%. This would lead to blurry displays. Given that 600 is almost 640 wouldn’t it be better to use the @2x image and scale it down 7%?
The fix for this is to not use 2.0, but instead something like 1.5.
width = 320, height = 480, scale = "letterbox", imageSuffix = { ["@2x"] = 1.5, },
Now any screen that’s 480px or wider will pick up the @2x image and for the 480px motorola it’s scaled down 50% which is sharper than scaling up the 1x image 50%. For the 600px Kindle fire, it needs the higher res image, so it will properly pick up the @2x image and produce a better display.
Enter the early iPads at 768px wide. Using the above config.lua code, you’re going to scale up the image about 20%, which isn’t the greatest, but still it’s not too bad. Now consider the retina iPads at 1536px. Those @2x images are now going to be scaled up over 200% which is really bad. This is why most people now include @4x images. Using this config.lua:
Â
width = 320, height = 480, scale = "letterbox", imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, },
Now any screen that’s 960px or wider will use the @4x images, sizing up and down as necessary. This means your retina iPads will get the @4x images, your 1080p devices will get the @4x images.Â
Now if you tweak the width/height to be 768 and 1024, and you use @2x, you’re likely not going to need @4x images (though more device’s are becoming higher resolution). If you change the suffix to ["@2x"] = 2.0, then on your retina iPads, you will get the 2x images, but on a 1080p device like the iPhone 8 plus, you’re going to get the 1x image that has to be scaled up. To make the 1080p devices get the @2x image, you would actually use ["@2x"] = 1.4.
There is no “right” way to do this. There is what works best for you. But the basic premise that the more detail an image has, scaling images up is bad. Providing extra resolutions (@2x, @3x, @4x etc.) makes your upload size larger. Only you can figure out this balancing act. But when creating your artwork, you should always start with a large resolution and then resize them down to your other needs (even in Photoshop you don’t want to scale up images).
Rob