This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo ImagePicker
A library that provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.
expo-image-picker provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.
Known issues iOS
On iOS, when an image (usually of a higher resolution) is picked from the camera roll, the result of the cropped image gives the wrong value for the cropped rectangle in some cases. Unfortunately, this issue is with the underlying UIImagePickerController due to a bug in the closed-source tools built into iOS.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Configuration in app config
You can configure expo-image-picker using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.
By default expo-image-picker will add RECORD_AUDIO permission on Android. You can remove it by setting the microphonePermission to false in the config below.
Example app.json with config plugin
Configurable properties
Are you using this library in an existing React Native app?
If you're not using Continuous Native Generation (CNG) or you're using a native ios project manually, then you need to add NSPhotoLibraryUsageDescription, NSCameraUsageDescription, and NSMicrophoneUsageDescription keys to your ios/[app]/Info.plist:
Usage
When you run this example and pick an image, you will see the image that you picked show up in your app, and a similar log will be shown in the console:
{ "assets": [ { "assetId": "C166F9F5-B5FE-4501-9531", "base64": null, "duration": null, "exif": null, "fileName": "IMG.HEIC", "fileSize": 6018901, "height": 3025, "type": "image", "uri": "file:///data/user/0/host.exp.exponent/cache/cropped1814158652.jpg" "width": 3024 } ], "canceled": false }
Invoke permissions for videos iOS
In SDK 54 and later, the default configuration keeps allowsEditing set to false and videoExportPreset set to 'Passthrough'. These settings return the original asset (including HEIC and AVIF files) instantly because the picker skips compression, but iOS requires media library permission to access the original file and displays a permission dialog immediately after the user selects a video.
To avoid showing permissions dialog after selection, manually request media library permissions before opening the picker via requestMediaLibraryPermissionsAsync or useMediaLibraryPermissions.
With AWS S3
An example of how to use AWS storage can be found in with-aws-storage-upload.
See Amplify documentation guide to set up your project correctly.
With Firebase
An example of how to use Firebase storage can be found in with-firebase-storage-upload.
See Using Firebase guide to set up your project correctly.
API
import * as ImagePicker from 'expo-image-picker';
No API data file found, sorry!
Permissions
Android
The following permissions are added automatically through the library's AndroidManifest.xml.
iOS
The following usage description keys are used by the APIs in this library.