Cropping With The Cloudinary Upload Widget

I came across a weird (?) setting in the Cloudinary universe while working with the upload widget. You can set it so that the user can crop their image upload before sending the photo up to Cloudinary. But when the image came through, I was getting the full version instead of the cropped version.

Turns out there is a further setting that needs to be added to the upload preset based on this Cloudinary stub: you have to set mode to crop and set gravity to custom.

This produced the desired result in that it cropped the image, but the resulting image still seems to be cropping with the wrong coordinates. I’ll need to figure that out later and will add the result here if I do.

For now I’m just cropping the photos on my phone before uploading.