A multiple image picker that enables your application to pick images and videos from multiple smart album in iOS/Android, similar to the current Facebook App.
1. Install and import the component.
# Yarn
$ yarn add @baronha/react-native-multiple-image-picker
# NPM
$ npm i @baronha/react-native-multiple-image-picker
2. Basic usage.
const response = await MultipleImagePicker.openPicker(options);
3. Full component options.
let defaultOptions = {
//**iOS**//
usedPrefetch: false,
allowedAlbumCloudShared: false,
muteAudio: true,
autoPlay: true,
//resize thumbnail
haveThumbnail: true,
thumbnailWidth: Math.round(width / 2),
thumbnailHeight: Math.round(height / 2),
allowedLivePhotos: true,
preventAutomaticLimitedAccessAlert: true, // newest iOS 14
emptyMessage: 'No albums',
selectedColor: '#30475e',
maximumMessageTitle: 'Notification',
maximumMessage: 'You have selected the maximum number of media allowed',
messageTitleButton: 'OK',
cancelTitle: 'Cancel',
tapHereToChange: 'Tap here to change',
//****//
//**Android**//
//****//
//**Both**//
usedCameraButton: true,
allowedVideo: true,
allowedPhotograph: true, // for camera : allow this option when you want to take a photos
allowedVideoRecording: false, //for camera : allow this option when you want to recording video.
maxVideoDuration: 60, //for camera : max video recording duration
numberOfColumn: 3,
maxSelectedAssets: 20,
singleSelectedMode: false,
doneTitle: 'Done',
isPreview: true,
mediaType: 'all',
isExportThumbnail: false,
//****//
// fetchOption: Object,
// fetchCollectionOption: Object,
// emptyImage: Image,
};
Author: baronha
Live Demo: View The Demo
Download Link: Download The Source Code
Official Website: https://github.com/baronha/react-native-multiple-image-picker
License: MIT