Device pixel ratio
Delivers the optimal size based on device pixel-ratio
Last updated
Delivers the optimal size based on device pixel-ratio
Last updated
©2024 Scaleflex SAS
Allows you to deliver the right 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 |
---|---|
No dpr parameter (assumed dpr=1): /docs/birds.jpg?w=400 | |
Device pixel ratio 1.75: /docs/birds.jpg?w=400&dpr=1.75 |