> For the complete documentation index, see [llms.txt](https://docs.cloudimage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudimage.io/transformations/image-operations/device-pixel-ratio.md).

# 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                                                                                                                                                                                                                                                                                       |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](/files/33Lr87FjcD5FozEDppX4) | <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>                                                                   |
| ![](/files/wK8C8RsUDbQ0ayMQCLjr) | <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> |
