# 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.

<mark style="color:orange;">**dpr=X**</mark>

## Examples

| Preview                                                                                            | Syntax                                                                                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://content.gitbook.com/content/IDIcmPiz7q6Sr6ZHHQxV/blobs/T7qrbTAVAPAR9itQyuQK/image.png) | <p>No dpr parameter (assumed dpr=1):<br><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/birds.jpg?w=400">/samples.scaleflex.com/birds.jpg?<mark style="color:orange;"><strong>w=400</strong></mark></a></p>                                                                   |
| ![](https://content.gitbook.com/content/IDIcmPiz7q6Sr6ZHHQxV/blobs/Fra4xESSug9mwd4SfSTT/image.png) | <p>Device pixel ratio 1.75:<br><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/birds.jpg?w=400&#x26;dpr=1.75">/samples.scaleflex.com/birds.jpg?<mark style="color:orange;"><strong>w=400</strong></mark>&<mark style="color:orange;"><strong>dpr=1.75</strong></mark></a></p> |
