Cloudinary-React with react-bootstrap carousel fails with responsive and width="auto"

Comments

1 comment

  • Official comment
    Avatar
    Akshay Joshi

    The error in your example indicates that we're receiving requests on our side where the width value is set to 0, which is not supported.

    Using the responsive features in our SDK the w_0 can happen if the responsive() method updates the URL in image tags that are in the DOM but which aren't displayed, and possible causes of this are images that are not shown because they're in a carousel but currently off-screen, are hidden behind other elements, or 'responsive()' was called before the page finished loading.

    We have an open feature request to add support for this to our SDK directly to prevent the creation of the URLs with w_0 in this case, but in the meantime, you can account for this in your code too via lazy loading, and/or calling responsive() for the image element when it becomes visible

    Comment actions Permalink

Please sign in to leave a comment.