is there a way to add object-fit/maintain aspect ratio to your cloudinary url?
Hey there guys :) I had a browse through the docs trying to find something for maintainting aspect ratio in cloudinary - sort of like css object-fit: contain; is there such a thing or a similar function inside cloudinary that actually is included in the cloudinary url? I am trying to use an avatar that I need to be 40x40 px at all times :)
-
Hi Linda,
You can use the resizing mode "c_pad" to resize your image and fill the specified dimensions while retaining the original aspect ratio and with all of the original image visible. To learn more about this, you may visit the documentation: https://cloudinary.com/documentation/resizing_and_cropping#pad
You can also check the other cropping and resizing modes here:
https://cloudinary.com/documentation/resizing_and_cropping#resize_and_crop_modes
Thanks,
Francis0
Post is closed for comments.
Comments
1 comment