Device Pixel Ratio
- Deliver images perfectly sized for HiDPI (Retina) devices.
dpr parameter is used to serve correctly sized images for devices that expose a device pixel ratio. The device pixel ratio is the ratio between physical pixels and logical pixels. For instance, the iPhone 5 reports a device pixel ratio of 2, because the physical linear resolution is double the logical resolution.
- Physical Resolution: 960 x 640
- Logical Resolution: 480 x 320
Other devices report different device pixel ratios, including non-integer ones. For example, the Nokia Lumia 1020 reports 1.6667, whereas the Samsumg Galaxy S4 reports 3.
||Device Pixel Ratio.|
||A whole number between 1 and 10000.|
||Decimal number between 0.0 and 9999.999…|
|Resize & Device Pixel Ratio - Resize the width to 200px for screens with a device pixel ratio of 2.||