
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-gallery-picker-pro
Advanced tools
A comprehensive React Native media gallery picker with smooth animations, multi-select, single-select, crop functionality, and native iOS/Android support
A comprehensive React Native media gallery picker with smooth animations, multi-select/single-select modes, crop functionality, and native iOS/Android support.
npm install motorinc-media-picker
Podfile:pod 'MotorincMediaPicker', :path => '../node_modules/motorinc-media-picker'
cd ios && pod install
The Android module is automatically linked with React Native 0.60+.
Make sure you have these peer dependencies installed:
npm install react-native-gesture-handler react-native-reanimated react-native-view-shot
Follow the setup instructions for:
import React from 'react';
import { View } from 'react-native';
import { MainPhotoGallery } from 'motorinc-media-picker';
export default function App() {
const handleAssetSelected = (asset) => {
console.log('Selected asset:', asset);
};
const handleSelectedAssetsChange = (assets) => {
console.log('Selected assets:', assets);
};
return (
<View style={{ flex: 1 }}>
<MainPhotoGallery
mediaType="all"
multiSelect={true}
maxSelectionLimit={10}
onAssetSelected={handleAssetSelected}
onSelectedAssetsChange={handleSelectedAssetsChange}
/>
</View>
);
}
import React, { useRef, useState } from 'react';
import { View, Button } from 'react-native';
import { MainPhotoGallery } from 'motorinc-media-picker';
export default function App() {
const galleryRef = useRef(null);
const [selectedAssets, setSelectedAssets] = useState([]);
const [cropParams, setCropParams] = useState(new Map());
const handleCroppedImagesReady = (croppedImages) => {
console.log('Cropped images:', croppedImages);
};
const handleCropCapture = async () => {
if (galleryRef.current) {
await galleryRef.current.triggerCropCapture();
}
};
return (
<View style={{ flex: 1 }}>
<MainPhotoGallery
ref={galleryRef}
mediaType="image"
multiSelect={true}
selectedAssets={selectedAssets}
onSelectedAssetsChange={setSelectedAssets}
showSelectedAssetsHeader={true}
onCropParamsChange={(assetId, params) => {
setCropParams(prev => new Map(prev.set(assetId, params)));
}}
existingCropParams={cropParams}
onCroppedImagesReady={handleCroppedImagesReady}
onAspectRatioChange={(ratio) => console.log('Aspect ratio:', ratio)}
/>
<Button title="Capture Cropped Images" onPress={handleCropCapture} />
</View>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
mediaType | 'image' | 'video' | 'all' | 'all' | Type of media to display |
multiSelect | boolean | false | Enable multi-selection mode |
maxSelectionLimit | number | 10 | Maximum number of assets that can be selected |
selectedAssets | PhotoAsset[] | [] | Currently selected assets |
onAssetSelected | (asset: PhotoAsset) => void | - | Callback when a single asset is selected |
onSelectedAssetsChange | (assets: PhotoAsset[]) => void | - | Callback when selected assets change |
showSelectedAssetsHeader | boolean | false | Show cropping header for selected assets |
hideSelectionHeader | boolean | false | Hide the selection mode header |
onCropParamsChange | (assetId: string, params: CropParams | null) => void | - | Callback for crop parameter changes |
existingCropParams | Map<string, CropParams> | - | Existing crop parameters |
onAspectRatioChange | (ratio: number) => void | - | Callback for aspect ratio changes |
onCroppedImagesReady | (images: Array<{assetId: string, dataUri: string}>) => void | - | Callback when cropped images are ready |
onCancel | () => void | - | Cancel button callback |
onNext | (assets: PhotoAsset[]) => void | - | Next button callback |
renderPermissionDeniedState | (onRequest?: () => void) => React.ReactNode | - | Custom permission denied state |
interface PhotoAsset {
id: string;
uri: string;
filename: string;
width: number;
height: number;
creationDate: number;
mediaType: 'image' | 'video';
duration?: number; // For videos
}
interface CropParams {
x: number;
y: number;
width: number;
height: number;
scale: number;
aspectRatio: number;
}
interface SelectedImage {
uri: string;
fileName: string;
fileSize: number;
width: number;
height: number;
type: string;
id: string;
base64: string;
}
The gallery implements smooth layered scroll behavior:
Add to your Info.plist:
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to photo library to select images</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app needs access to save images to photo library</string>
Add to your AndroidManifest.xml:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
MIT
If you like this project, please consider giving it a ⭐ on GitHub!
FAQs
A comprehensive React Native media gallery picker with smooth animations, multi-select, single-select, crop functionality, and native iOS/Android support
We found that react-native-gallery-picker-pro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.