Device pixel ratio
Delivers the optimal size based on device pixel-ratio
Allows you to deliver the proper image dimensions according to a defined device pixel ratio. This operation can help with conversion between device-independent pixels and CSS (reference) pixels. Useful in responsive image solutions using the
srcset
HTML attribute. Allows positive values limited to 5.dpr=X
Preview | Syntax |
---|---|
![]() | |
![]() |
Last modified 1mo ago