microCMS

Resolution and Screen Size

Parameters

dpr

Controls the output density of images.
This allows you to deliver the correct size of images for various devices from a single image.
The default value is 1, and you can input up to 8.

When specifying the dpr parameter, please also specify the height and width.
This parameter is suitable when you want to use images for different screen sizes.
For example, it can be used with srcset as shown below.

<img
    srcset="https://xxxxxx/sample.png?h=300&w=500&dpr=1 1x,
        https://xxxxxx/sample.png?h=300&w=500&dpr=2 2x,
        https://xxxxxx/sample.png?h=300&w=500&dpr=3 3x"
    src="https://xxxxxx/sample.png?h=300&w=500&dpr=1"
/>

Example) ?dpr=2&w=300