I\'ve created a PWA that installs correctly, with a launcher icon. I want a different image for the splash screen, so I\'ve included 192px and 512px png\'s, both 128dpi and
According to this documentation, as you have already known, Chrome will choose the icon that closely matches the 128dp
icon for that device.
Please take note that dp
(Density-independent Pixels) is different from dpi
(Dots Per Inch). Simply put, 128dpi
is not necessarily equal to 128dp
, which is most likely the problem in your case.
This SO answer explains the difference between the two well.
For example, on a
160dpi
screen,1dp == 1px == 1/160in
, but on a240dpi
screen,1dp == 1.5px
. So no,1dp != 1px
. There is exactly one case when1dp == 1px
, and that's on a160dpi
screen. Physical measurement units like inches should never be part of your design—that is, unless you're making a ruler.A simple formula for determining how many pixels
1dp
works out to ispx = dp * (dpi / 160)
.
Based on this simple formula, your 192px, 128dpi
image has 240dp
, while your 512px, 128dpi
image has 640dp
. Assuming your other images all have 128dpi
as well, then Chrome is most likely picking your 96px
image due to it having the closest dp
to 128dp
.
In conclusion, for your 192px
or 512px
images to have 128dp
, they need to have 160dpi
.