Crop an image of desired size

Hi,

I am using the imagepicker of Expo after taking a picture I am able to crop a image using dragging the edges to a desired size in Android where as in iOS it is just a fixed size of cropping the image. What code changes should me made to allow the image to be cropped to anysize?

Thanks in advance

1 Like

Hi there, please take a look at the docs here:

https://docs.expo.io/versions/latest/sdk/imagepicker.html#aspect-array--an-array-with-two-entries-x-y-specifying-the-aspect-ratio-to-maintain-if-the-user-is-allowed-to-edit-the-image-by-passing-allowsediting-true-this-is-only-applicable-on-android-since-on-ios-the-crop-rectangle-is-always-a-square-1

I have used the allowEditing option but it just giving me the default crop option. Can we make the iOS crop same as the Android by adding any extra features?

Do you know any react-native library that does this work?

I’ve used https://github.com/bamlab/react-native-image-resizer in some projects before and it does work correctly.

However you’ll need to detach because we don’t use that in our SDK at this moment.

1 Like