具有自动高度而不是自动宽度的 Cloudinary 响应图像

Cloudinary responsive image with auto height instead of auto width

所以我阅读了最近关于响应式图像标签的 Cloudinary 博客 post。特别是,我现在使用这一行(对于 Rails 2.1 上的 Ruby):

cl_image_tag("example.jpg", :width => :auto, :responsive_placeholder => "blank") 然后 <script type="text/javascript">$.cloudinary.responsive()</script>

这按预期工作; Cloudinary 响应式调整图像大小以缩放并占用尽可能多的 width

但是,我想响应式地调整图像的大小,以在允许的范围内获得尽可能多的高度。执行此操作的最佳方法是什么,因为我不认为它内置于 $.cloudinary.responsive()?

感谢您的宝贵时间!

我阅读的链接:
http://cloudinary.com/blog/how_to_automatically_create_images_for_responsive_design https://github.com/cloudinary/cloudinary_js/blob/master/js/jquery.cloudinary.js#L675

目前 $.cloudinary.responsive() 方法仅支持自动宽度。 Cloudinary 也在努力扩展对自动高度的响应支持。