This support forum is no longer in use. Please use the Cloudinary Community at to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

Prevent upscaling responsive images



  • Avatar
    Marissa Masangcay

    Hi Micah,

    Cloudinary supports conditional transformations for images where certain transformations are applied when a particular condition is met (or not met, depending on the logic). You can read more about and view examples of our conditional transformations in our documentation here:

    However, as an example of the situation that you gave, here is a URL that adjusts the width of the image depending on if the image's height is greater than or less than 500px:,h_600/if_h_gt_500,w_300/sample.jpg

    In this URL I first specified the height so that you can play around with the height values and see the differences when the height is less than or greater than 500px. When the height is greater than 500px it then transforms the image to have a width of 300px.

    Please feel free to play around with the width and height values to get a feel of how it works. :)

    Hope this helps!

    Comment actions Permalink
  • Avatar
    Micah Kohne

    Wow - this is so powerful. Thanks for the help Marissa.

    Comment actions Permalink

Post is closed for comments.