Reputation: 2327
What would be the right approach to crop several images at ones in React Native? I'm working on an app where user selects many photos but before uploading them to the server, each photo should have the right aspect ratio - 1:1, 2:3, etc.
I'm using react-native-image-crop-picker
to allow user to select multiple photos at ones. Initially I used to same library to allow users to crop one photo at a time but it was a bad user experience as people upload 10-20 photos at a time. So I thought of auto-cropping images behind the scene using ImageEditor.cropImage()
Now I get the cropped image but it almost freezes the app until the images are cropped, leading to bad ux. Any leads on how this should be tackled?
Upvotes: 1
Views: 1276
Reputation: 1488
In my opinion this seems like a very difficult scope to cover only by using the react-native-image-picker
library. I would rethink this lack of flexibility on the server side when receiving images too. Basically I think it's just not a good UX demanding the user to upload multiple images with a restricted aspect ratio on a mobile device.
But if that's not possible you could try to solving this problem with the following options for better UX:
Upvotes: 1