# Device pixel ratio

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.

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

## Examples

| Preview                                                                                                                                                                                                             | Syntax                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ![](https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FWKfetc4ps2T029GzPLHo%2Fimage.png?alt=media\&token=62b51d3b-e089-48ee-ad74-5a2d488fb6dd) | <p>No dpr parameter (assumed dpr=1):<br><a href="https://fdocs.filerobot.com/docs/birds.jpg?w=400">/docs/birds.jpg?<mark style="color:orange;"><strong>w=400</strong></mark></a></p>                                                                   |
| ![](https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F6Nr1AwIIgU6I26vI5azS%2Fimage.png?alt=media\&token=193ba134-e316-4178-bd34-ba4f037ccada) | <p>Device pixel ratio 1.75:<br><a href="https://fdocs.filerobot.com/docs/birds.jpg?w=400&#x26;dpr=1.75">/docs/birds.jpg?<mark style="color:orange;"><strong>w=400</strong></mark>&<mark style="color:orange;"><strong>dpr=1.75</strong></mark></a></p> |
