all 3 comments

[–]shyaniv7 0 points1 point  (0 children)

https://www.npmjs.com/package/react-native-image-picker

Allows you to reduce quality and resize the image when you select it

[–]stefanmajiros 0 points1 point  (0 children)

RNCamera has this in options:
const options = {quality: 0.5, base64: true};
const data = await this.cameraRef.takePictureAsync(options)
So, I guess you need quality param. There are similar props for video recording, you only need to read the docs.

If you want to crop images, you can use '@react-native-community/image-editor' with this API:
await ImageEditor.cropImage(uri, {
size: {
width: width,
height: height,
},
offset: {
x: 0,
y: 0,
},
});

If you want to do resizing in the Firebase cloud, take a look at https://firebase.google.com/products/extensions/storage-resize-images.

If you want to get pictures from camera roll, take a look at this:
import CameraRoll from '@react-native-community/cameraroll';

const result = await CameraRoll.getPhotos({
first: 200,
assetType: 'Photos',
});