How to resize image by aspect ratio
Hi,
I need to resize image by aspect ratio
For example: I have an image with the resolution 271x406 and need to convert this into 4:5 ratio and the expected image resolution is 1080x1618
-
Hi Jennifer,
You can resize the image to a given aspect ratio by defining either the width or the height and the aspect ratio.
Eg: https://res.cloudinary.com/demo/image/upload/w_1080,ar_4:5,c_fill/sample.jpg
or you can specify the exact width and height what you would want the final image to be: https://res.cloudinary.com/demo/image/upload/w_1080,ar_4:5,h_1618,c_fill/sample.jpg
1080x1618 is not a 4:5 aspect ratio so you can choose from either of the two options above.
More information here: https://cloudinary.com/documentation/image_transformations#aspect_ratio_based_cropping
Regards,
Aditi0
Post is closed for comments.
Comments
1 comment