Skip to main content

srcset and dpr with AdvancedImage React component

Comments

1 comment

  • Tia Esguerra

    Hi there,

    Thanks so much for reaching out. 

    I saw that you opened a support ticket asking the same question, which I answered there directly. But I will post here as well, for the benefit of others who may be looking for the same information.

    Version 2 of the React SDK does not support dpr_auto, and we will not be adding support for that, but this is something you can implement yourself, using something similar to this ( in pseudocode ):

     setDPR(devicePixelRatio || 1)

    Have you had a chance to look over the responsive images plugin? You can use this plugin to make all of your images responsive so that they automatically resize based on the viewport size. You can reference that documentation here: 
    https://cloudinary.com/documentation/react_image_transformations#responsive_images

    Hope this helps. Let us know if you have questions.

    0

Post is closed for comments.