expo-image-picker
TypeScript icon, indicating that this package has built-in type declarations

16.0.6 • Public • Published

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.

API documentation

Installation in managed Expo projects

For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.

Installation in bare React Native projects

For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.

Add the package to your npm dependencies

npx expo install expo-image-picker

Configure for Android

This is only required for usage in bare React Native apps.

This package automatically adds the CAMERA, READ_EXTERNAL_STORAGE, and WRITE_EXTERNAL_STORAGE permissions. They are used when picking images from the camera directly, or from the camera roll.

<!-- Added permissions -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Configure for iOS

This is only required for usage in bare React Native apps.

Add NSPhotoLibraryUsageDescription, NSCameraUsageDescription, and NSMicrophoneUsageDescription keys to your Info.plist:

<key>NSPhotoLibraryUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to save photos</string>
<key>NSCameraUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to access your camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to use your microphone</string>

Run npx pod-install after installing the npm package.

Config Plugin

This plugin is applied automatically in EAS Build, only add the config plugin if you want to pass in extra properties.

After installing this npm package, add the config plugin to the plugins array of your app.json or app.config.js:

{
  "expo": {
    "plugins": ["expo-image-picker"]
  }
}

Next, rebuild your app as described in the "Adding custom native code" guide.

API

The plugin provides props for extra customization. Every time you change the props or plugins, you'll need to rebuild (and prebuild) the native app. If no extra properties are added, defaults will be used.

  • photosPermission (string | false): Sets the iOS NSPhotoLibraryUsageDescription permission message to the Info.plist. Setting false will skip adding the permission on iOS and does not skip the permission on Android. Defaults to Allow $(PRODUCT_NAME) to access your photos.
  • cameraPermission (string | false): Sets the iOS NSCameraUsageDescription permission message to the Info.plist. Setting false will skip adding the permission on iOS and does not skip the permission on Android. Defaults to Allow $(PRODUCT_NAME) to access your camera.
  • microphonePermission (string | false): Sets the iOS NSCameraUsageDescription permission message to the Info.plist. Setting false will skip adding the permission on iOS and skips adding the android.permission.RECORD_AUDIO Android permission. Defaults to Allow $(PRODUCT_NAME) to access your photos.

Example

{
  "expo": {
    "plugins": [
      [
        "expo-image-picker",
        {
          "photosPermission": "custom photos permission",
          "cameraPermission": "Allow $(PRODUCT_NAME) to open the camera",

          "//": "Disables the microphone permission",
          "microphonePermission": false
        }
      ]
    ]
  }
}

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
16.0.6168,689latest
15.1.025,191sdk-51
14.7.117,879sdk-50
16.1.1-canary-20250408-7f0ab53241canary
16.1.3205next

Version History

VersionDownloads (Last 7 Days)Published
16.1.3205
16.1.21,649
16.1.1127
16.1.1-canary-20250408-7f0ab53241
16.1.1-canary-20250407-10a9b421
16.1.03
16.1.0-canary-20250404-3c3b5fd1
16.1.0-canary-20250404-87e25061
16.1.0-canary-20250404-42b62631
16.1.0-canary-20250403-13261ac189
16.1.0-canary-20250402-161f57b78
16.1.0-canary-20250331-817737a1
16.1.0-canary-20250320-7a205d30
16.1.0-canary-20250306-d9d3e02120
16.1.0-canary-20250305-0af9ad20
16.1.0-canary-20250304-f08e98437
16.1.0-canary-20250304-8a21aa71
16.1.0-canary-20250304-0da39711
16.1.0-canary-20250303-4dba60e0
16.1.0-canary-20250221-ef26fed2
16.1.0-canary-20250219-4a5dade0
16.0.6168,689
16.1.0-canary-20250207-8bc51462
16.0.55,879
16.1.0-canary-20250131-5c4e5880
15.1.025,191
16.0.5-canary-20250124-42fe3320
16.0.5-canary-20250122-166c2cb0
16.0.5-canary-20250114-804e26d1
16.0.410,361
16.0.4-canary-20241211-61c49bd0
16.0.312,588
16.0.2784
16.0.1202
16.0.07
16.0.0-canary-20241021-c4b5a930
16.0.0-canary-20241021-7aba8130
16.0.0-canary-20241018-ebd377a0
16.0.0-canary-20241018-2a482e30
16.0.0-canary-20241018-75a0b250
16.0.0-canary-20241018-4f8243a0
16.0.0-canary-20241018-f71b3e01
16.0.0-canary-20241008-90b13ad1
16.0.0-canary-20240927-ab8a9620
16.0.0-canary-20240912-1059f850
16.0.0-canary-20240904-69100c10
16.0.0-canary-20240814-ce0f7d513
15.0.8-canary-20240719-83ee47b2
15.0.738,073
15.0.7-canary-20240628-1ba81520
15.0.7-canary-20240627-1402f4b0
15.0.7-canary-20240625-2333e700
15.0.6446
15.0.51,498
15.0.477
15.0.30
15.0.21
15.0.13
15.0.016
0.0.1-canary-20240418-8d745970
0.0.1-canary-20240415-cca04d80
0.0.1-canary-20240415-0868fc40
0.0.1-canary-20240411-55a00850
0.0.1-canary-20240411-33a7dc10
0.0.1-canary-20240406-a4950c70
0.0.1-canary-20240405-cdfd9c10
0.0.1-canary-20240404-e2b87431
0.0.1-canary-20240328-24ecc5e1
0.0.1-canary-20240327-a7302d90
0.0.1-canary-20240320-8a10e090
0.0.1-canary-20240318-dd8f2450
0.0.1-canary-20240318-af634b10
0.0.1-canary-20240318-53194f50
0.0.1-canary-20240315-ce710050
0.0.1-canary-20240308-67158750
0.0.1-canary-20240305-e60019e0
0.0.1-canary-20240228-7cee6191
0.0.1-canary-20240222-c729a130
0.0.1-canary-20240109-93608d80
14.7.117,879
0.0.1-canary-20231205-250b31f0
0.0.1-canary-20231130-c8a9bf90
0.0.1-canary-20231130-ede75a7-10
0.0.1-canary-20231130-ede75a70
0.0.1-canary-20231129-c0ec0230
0.0.1-canary-20231125-d600e440
0.0.0-canary-20231123-1b19f960
14.7.086
14.6.042
14.5.0763
14.4.18
14.4.01
14.3.26,600
14.3.138
14.3.00
14.2.04
14.1.12,220
14.1.06
14.0.3502
14.0.2399
14.0.15
14.0.03
13.3.1421
13.3.00
13.2.10
13.2.00
13.1.1158
13.1.00
13.0.13
13.0.02
12.0.2141
12.0.170
12.0.01
11.0.353
11.0.21
11.0.10
11.0.01
10.2.3396
10.2.289
10.2.11
10.2.01
10.1.4149
10.1.32
10.1.20
10.1.10
10.1.00
10.0.05
9.2.163
9.2.00
9.1.149
9.1.00
9.0.00
8.4.018
8.3.028
8.2.02
8.1.043
8.0.250
8.0.113
8.0.00
7.0.019
7.0.0-rc.00
6.0.034
6.0.0-rc.00
5.0.2250
5.0.11
5.0.03
5.0.0-rc.10
5.0.0-rc.00
4.0.04
3.0.00
1.0.00

Package Sidebar

Install

npm i expo-image-picker

Weekly Downloads

281,076

Version

16.0.6

License

MIT

Unpacked Size

297 kB

Total Files

71

Last publish

Collaborators

  • tsapeta
  • ide
  • lukmccall
  • pkham
  • radoslawkrzemien
  • fiber-god
  • betoatexpo
  • brentvatne
  • evanbacon
  • quinlanj
  • expoadmin
  • exponent
  • wschurman
  • bycedric
  • jonsamp
  • princefleaswallow
  • kudochien
  • keith-kurak
  • alanhughes
  • simek
  • gabrieldonadel
  • douglowder
  • kadikraman
  • aleqsio
  • expo-bot
  • philpl
  • marklawlor