---
modificationDate: April 07, 2026
title: ImagePicker
description: 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.
sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-image-picker'
packageName: 'expo-image-picker'
iconUrl: '/static/images/packages/expo-image-picker.png'
platforms: ['android', 'ios', 'web', 'expo-go']
---

<AgentInstructions>

## Submitting Feedback

If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved:

curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/versions/v55.0.0/sdk/imagepicker/","feedback":"🤖 Agent feedback: <specific, actionable description>"}'

Only submit when you have something specific and actionable to report.

</AgentInstructions>

# 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.
Android, iOS, Web, Included in Expo Go

> For the complete documentation index, see [llms.txt](/llms.txt). Use this file to discover all available pages.

`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.

## Installation

```sh
npx expo install expo-image-picker
```

If you are installing this in an [existing React Native app](/bare/overview), make sure to [install `expo`](/bare/installing-expo-modules) in your project.

#### Known issues 

On iOS, when an image (usually of a [higher resolution](https://openradar.me/49866214)) 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.

## Configuration in app config

You can configure `expo-image-picker` using its built-in [config plugin](/config-plugins/introduction) if you use config plugins in your project ([Continuous Native Generation (CNG)](/workflow/continuous-native-generation)). 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

```json
{
  "expo": {
    "plugins": [
      [
        "expo-image-picker",
        {
          "photosPermission": "The app accesses your photos to let you share them with your friends.",
          "colors": {
            "cropToolbarColor": "#000000"
          },
          "dark": {
            "colors": {
              "cropToolbarColor": "#000000"
            }
          }
        }
      ]
    ]
  }
}
```

### Configurable properties

| Name | Default | Description |
| --- | --- | --- |
| `photosPermission` | `"Allow $(PRODUCT_NAME) to access your photos"` | Only for: iOS. A string to set the `NSPhotoLibraryUsageDescription` permission message. |
| `cameraPermission` | `"Allow $(PRODUCT_NAME) to access your camera"` | A string to set the `NSCameraUsageDescription` permission message. If value `false` is provided then `CAMERA` permission will be blocked on Android. |
| `microphonePermission` | `"Allow $(PRODUCT_NAME) to access your microphone"` | A string to set the `NSMicrophoneUsageDescription` permission message. If value `false` is provided then `RECORD_AUDIO` permission will be blocked on Android. |
| `colors` | `undefined` | Only for: Android. An object containing color properties for customizing the image picker crop UI in light mode. |
| `colors.cropToolbarColor` | `#00000000` | Only for: Android. A hex color string for the crop toolbar background color. |
| `colors.cropToolbarIconColor` | `#ffffff` | Only for: Android. A hex color string for the crop toolbar icon color. |
| `colors.cropToolbarActionTextColor` | `#ffffff` | Only for: Android. A hex color string for the crop toolbar action text color. |
| `colors.cropBackButtonIconColor` | `#ffffff` | Only for: Android. A hex color string for the crop toolbar back button icon color. |
| `colors.cropBackgroundColor` | `#ffffff` | Only for: Android. A hex color string for the crop screen background color. |
| `dark.colors` | `{ cropToolbarColor: "#00000000", cropToolbarIconColor: "#ffffff", cropToolbarActionTextColor: "#ffffff", cropBackButtonIconColor: "#ffffff", cropBackgroundColor: "#000000" }` | Only for: Android. An object containing color properties for customizing the image picker crop UI in dark mode. |

Are you using this library in an existing React Native app?

If you're not using Continuous Native Generation ([CNG](/workflow/continuous-native-generation)) 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**:

```xml
<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>
```

## Usage

```tsx
import { useState } from 'react';
import { Alert, Button, Image, View, StyleSheet } from 'react-native';
import * as ImagePicker from 'expo-image-picker';

export default function ImagePickerExample() {
  const [image, setImage] = useState<string | null>(null);

  const pickImage = async () => {
    // No permissions request is necessary for launching the image library.
    // Manually request permissions for videos on iOS when `allowsEditing` is set to `false`
    // and `videoExportPreset` is `'Passthrough'` (the default), ideally before launching the picker
    // so the app users aren't surprised by a system dialog after picking a video.
    // See "Invoke permissions for videos" sub section for more details.
    const permissionResult = await ImagePicker.requestMediaLibraryPermissionsAsync();

    if (!permissionResult.granted) {
      Alert.alert('Permission required', 'Permission to access the media library is required.');
      return;
    }

    let result = await ImagePicker.launchImageLibraryAsync({
      mediaTypes: ['images', 'videos'],
      allowsEditing: true,
      aspect: [4, 3],
      quality: 1,
    });

    console.log(result);

    if (!result.canceled) {
      setImage(result.assets[0].uri);
    }
  };

  return (
    <View style={styles.container}>
      <Button title="Pick an image from camera roll" onPress={pickImage} />
      {image && <Image source={{ uri: image }} style={styles.image} />}
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  image: {
    width: 200,
    height: 200,
  },
});
```

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:

```json
{
  "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

In SDK 54 and later, the default configuration keeps `allowsEditing` set to `false` and [`videoExportPreset`](/versions/v55.0.0/sdk/imagepicker#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`](/versions/v55.0.0/sdk/imagepicker#imagepickerrequestmedialibrarypermissionsasyncwriteonly) or [`useMediaLibraryPermissions`](/versions/v55.0.0/sdk/imagepicker#usemedialibrarypermissionsoptions).

### With AWS S3

[AWS storage example](https://github.com/expo/examples/tree/master/with-aws-storage-upload) — An example of how to use AWS storage can be found in with-aws-storage-upload.

See [Amplify documentation](https://docs.amplify.aws/) guide to set up your project correctly.

### With Firebase

[Firebase storage example](https://github.com/expo/examples/tree/master/with-firebase-storage-upload) — An example of how to use Firebase storage can be found in with-firebase-storage-upload.

See [Using Firebase](/guides/using-firebase) guide to set up your project correctly.

## API

```js
import * as ImagePicker from 'expo-image-picker';
```

## Hooks

### `useCameraPermissions(options)`

Supported platforms: Android, iOS, Web.

| Parameter | Type |
| --- | --- |
| `options`(optional) | `PermissionHookOptions<object>` |

  

Check or request permissions to access the camera. This uses both `requestCameraPermissionsAsync` and `getCameraPermissionsAsync` to interact with the permissions.

Returns: `[PermissionResponse | null, RequestPermissionMethod<permissionresponse>, GetPermissionMethod]</permissionresponse>`

Example

```ts
const [status, requestPermission] = ImagePicker.useCameraPermissions();
```

### `useMediaLibraryPermissions(options)`

Supported platforms: Android, iOS, Web.

| Parameter | Type |
| --- | --- |
| `options`(optional) | `PermissionHookOptions<{ writeOnly: boolean }>` |

  

Check or request permissions to access the media library. This uses both `requestMediaLibraryPermissionsAsync` and `getMediaLibraryPermissionsAsync` to interact with the permissions.

Returns: `[MediaLibraryPermissionResponse | null, RequestPermissionMethod<medialibrarypermissionresponse>, GetPermissionMethod]</medialibrarypermissionresponse>`

Example

```ts
const [status, requestPermission] = ImagePicker.useMediaLibraryPermissions();
```

## Methods

### `ImagePicker.getCameraPermissionsAsync()`

Supported platforms: Android, iOS, Web.

Checks user's permissions for accessing camera.

Returns: `Promise<permissionresponse>`

A promise that fulfills with an object of type [CameraPermissionResponse](#camerapermissionresponse).

### `ImagePicker.getMediaLibraryPermissionsAsync(writeOnly)`

Supported platforms: Android, iOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `writeOnly`(optional) | `boolean` | Whether to request write or read and write permissions. Defaults to `false`. Default: `false` |

  

Checks user's permissions for accessing photos.

Returns: `Promise<medialibrarypermissionresponse>`

A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).

### `ImagePicker.getPendingResultAsync()`

Supported platforms: Android, iOS, Web.

Android system sometimes kills the `MainActivity` after the `ImagePicker` finishes. When this happens, we lose the data selected using the `ImagePicker`. However, you can retrieve the lost data by calling `getPendingResultAsync`. You can test this functionality by turning on `Don't keep activities` in the developer options.

Returns: `Promise<imagepickererrorresult>`

-   **On Android:** a promise that resolves to an object of exactly same type as in `ImagePicker.launchImageLibraryAsync` or `ImagePicker.launchCameraAsync` if the `ImagePicker` finished successfully. Otherwise, an object of type [`ImagePickerErrorResult`](#imagepickerimagepickererrorresult).
-   **On other platforms:** `null`

### `ImagePicker.launchCameraAsync(options)`

Supported platforms: Android, iOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `options`(optional) | [ImagePickerOptions](#imagepickeroptions) | An `ImagePickerOptions` object. Default: `{}` |

  

Display the system UI for taking a photo with the camera. Requires `Permissions.CAMERA`. On Android and iOS 10 `Permissions.CAMERA_ROLL` is also required. On mobile web, this must be called immediately in a user interaction like a button press, otherwise the browser will block the request without a warning.

> **Note:** Make sure that you handle `MainActivity` destruction on **Android**. See [ImagePicker.getPendingResultAsync](#imagepickergetpendingresultasync). **Notes for Web:** The system UI can only be shown after user activation (e.g. a `Button` press). Therefore, calling `launchCameraAsync` in `componentDidMount`, for example, will **not** work as intended. The `cancelled` event will not be returned in the browser due to platform restrictions and inconsistencies across browsers.

Returns: `Promise<imagepickerresult>`

A promise that resolves to an object with `canceled` and `assets` fields. When the user canceled the action the `assets` is always `null`, otherwise it's an array of the selected media assets which have a form of [`ImagePickerAsset`](#imagepickerasset).

### `ImagePicker.launchImageLibraryAsync(options)`

Supported platforms: Android, iOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `options`(optional) | [ImagePickerOptions](#imagepickeroptions) | An object extended by [`ImagePickerOptions`](#imagepickeroptions). Default: `{}` |

  

Display the system UI for choosing an image or a video from the phone's library. Requires `Permissions.MEDIA_LIBRARY` on iOS 10 only. On mobile web, this must be called immediately in a user interaction like a button press, otherwise the browser will block the request without a warning.

**Animated GIFs support:** On Android, if the selected image is an animated GIF, the result image will be an animated GIF too if and only if `quality` is explicitly set to `1.0` and `allowsEditing` is set to `false`. Otherwise compression and/or cropper will pick the first frame of the GIF and return it as the result (on Android the result will be a PNG). On iOS, both quality and cropping are supported.

> **Notes for Web:** The system UI can only be shown after user activation (e.g. a `Button` press). Therefore, calling `launchImageLibraryAsync` in `componentDidMount`, for example, will **not** work as intended. The `cancelled` event will not be returned in the browser due to platform restrictions and inconsistencies across browsers.

Returns: `Promise<imagepickerresult>`

A promise that resolves to an object with `canceled` and `assets` fields. When the user canceled the action the `assets` is always `null`, otherwise it's an array of the selected media assets which have a form of [`ImagePickerAsset`](#imagepickerasset).

### `ImagePicker.requestCameraPermissionsAsync()`

Supported platforms: Android, iOS, Web.

Asks the user to grant permissions for accessing camera. This does nothing on web because the browser camera is not used.

Returns: `Promise<permissionresponse>`

A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).

### `ImagePicker.requestMediaLibraryPermissionsAsync(writeOnly)`

Supported platforms: Android, iOS, Web.

| Parameter | Type | Description |
| --- | --- | --- |
| `writeOnly`(optional) | `boolean` | Whether to request write or read and write permissions. Defaults to `false`. Default: `false` |

  

Asks the user to grant permissions for accessing user's photo. This method does nothing on web.

Returns: `Promise<medialibrarypermissionresponse>`

A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).

## Types

### `CameraPermissionResponse`

Supported platforms: Android, iOS, Web.

Type: `PermissionResponse`

Alias for `PermissionResponse` type exported by `expo-modules-core`.

### `CropShape`

Supported platforms: Android, iOS, Web.

Literal Type: `string`

The shape of the crop area.

Acceptable values are: `'rectangle'` | `'oval'`

### `DefaultTab`

Supported platforms: Android.

Literal Type: `string`

The default tab with which the image picker will be opened.

-   `'photos'` - the photos/videos tab will be opened.
-   `'albums'` - the albums tab will be opened.

Acceptable values are: `'photos'` | `'albums'`

### `ImagePickerAsset`

Supported platforms: Android, iOS, Web.

Represents an asset (image or video) returned by the image picker or camera.

| Property | Type | Description |
| --- | --- | --- |
| assetId(optional) | `string | null` | Supported platforms: Android, iOS. The unique ID that represents the picked image or video, if picked from the library. It can be used by [expo-media-library](/versions/v55.0.0/sdk/media-library) to manage the picked asset. This might be null when the ID is unavailable or the user gave limited permission to access the media library. On Android, the ID is unavailable when the user selects a photo by directly browsing file system. |
| base64(optional) | `string | null` | When the `base64` option is truthy, it is a Base64-encoded string of the selected image's JPEG data, otherwise `null`. If you prepend this with `'data:image/jpeg;base64,'` to create a data URI, you can use it as the source of an `Image` element; for example:
```ts
<Image
  source={{ uri: 'data:image/jpeg;base64,' + asset.base64 }}
  style={{ width: 200, height: 200 }}
/>
```

 |
| duration(optional) | `number | null` | Length of the video in milliseconds or `null` if the asset is not a video. |
| exif(optional) | `Record<string, any> | null` | Supported platforms: Android, iOS. The `exif` field is included if the `exif` option is truthy, and is an object containing the image's EXIF data. The names of this object's properties are EXIF tags and the values are the respective EXIF values for those tags. |
| file(optional) | [File](#file) | Supported platforms: Web. The web `File` object containing the selected media. This property is web-only and can be used to upload to a server with `FormData`. |
| fileName(optional) | `string | null` | Preferred filename to use when saving this item. This might be `null` when the name is unavailable or user gave limited permission to access the media library. |
| fileSize(optional) | `number` | File size of the picked image or video, in bytes. |
| height | `number` | Height of the image or video. Can be `0` if the system did not provide the height. |
| mimeType(optional) | `string` | The MIME type of the selected asset or `null` if could not be determined. |
| pairedVideoAsset(optional) | [ImagePickerAsset](#imagepickerasset) | null | Supported platforms: iOS. Contains information about the video paired with the image file. This property is only set when `livePhotos` media type was present in the `mediaTypes` array when launching the picker and a live photo was selected. |
| type(optional) | `'image' | 'video' | 'livePhoto' | 'pairedVideo' | null` | The type of the asset.

-   `'image'` - for images.
-   `'video'` - for videos.
-   `'livePhoto'` - for live photos. (iOS only)
-   `'pairedVideo'` - for videos paired with photos, which can be combined to create a live photo. (iOS only)
-   `null` - when the type could not be determined. This is rare but can happen with some Android ContentProviders.

 |
| uri | `string` | URI to the local image or video file (usable as the source of an `Image` element, in the case of an image) and `width` and `height` specify the dimensions of the media. |
| width | `number` | Width of the image or video. Can be `0` if the system did not provide the width. |

### `ImagePickerCanceledResult`

Supported platforms: Android, iOS, Web.

Type representing canceled pick result.

| Property | Type | Description |
| --- | --- | --- |
| assets | `null` | `null` signifying that the request was canceled. |
| canceled | `true` | Boolean flag set to `true` showing that the request was canceled. |

### `ImagePickerErrorResult`

Supported platforms: Android, iOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| code | `string` | The error code. |
| exception(optional) | `string` | The exception which caused the error. |
| message | `string` | The error message. |

### `ImagePickerOptions`

Supported platforms: Android, iOS, Web.

| Property | Type | Description |
| --- | --- | --- |
| allowsEditing(optional) | `boolean` | Supported platforms: Android, iOS. Whether to show a UI to edit the image after it is picked. On Android the user can crop and rotate the image and on iOS simply crop it. Default: `false` |
| allowsMultipleSelection(optional) | `boolean` | Supported platforms: Android, iOS 14+, Web. Whether or not to allow selecting multiple media files at once. Cropping multiple images is not supported - this option is mutually exclusive with allowsEditing. If this option is enabled, then allowsEditing is ignored. Default: `false` |
| aspect(optional) | `[number, number]` | An array with two entries `[x, y]` specifying the aspect ratio to maintain if the user is allowed to edit the image (by passing `allowsEditing: true`). This is only applicable on Android, since on iOS the crop rectangle is always a square. |
| base64(optional) | `boolean` | Whether to also include the image data in Base64 format. |
| cameraType(optional) | [CameraType](#cameratype) | Selects the camera-facing type. The `CameraType` enum provides two options: `front` for the front-facing camera and `back` for the back-facing camera.
-   **On Android**, the behavior of this option may vary based on the camera app installed on the device.
-   **On Web**, if this option is not provided, use "camera" as the default value of internal input element for backwards compatibility.

. Default: `CameraType.back` |
| defaultTab(optional) | [DefaultTab](#defaulttab) | Supported platforms: Android. Choose the default tab with which the image picker will be opened. Default: `'photos'` |
| exif(optional) | `boolean` | Supported platforms: Android, iOS. Whether to also include the EXIF data for the image. On iOS the EXIF data does not include GPS tags in the camera case. |
| legacy(optional) | `boolean` | Supported platforms: Android. Uses the legacy image picker on Android. This will allow media to be selected from outside the users photo library. Default: `false` |
| mediaTypes(optional) | [MediaType](#mediatype) | [MediaType[]](#mediatype) | [MediaTypeOptions](#mediatypeoptions) | Choose what type of media to pick. Default: `'images'` |
| orderedSelection(optional) | `boolean` | Supported platforms: iOS 15+. Whether to display number badges when assets are selected. The badges are numbered in selection order. Assets are then returned in the exact same order they were selected. Assets should be returned in the selection order regardless of this option, but there is no guarantee that it is always true when this option is disabled. Default: `false` |
| preferredAssetRepresentationMode(optional) | [UIImagePickerPreferredAssetRepresentationMode](#uiimagepickerpreferredassetrepresentationmode) | Supported platforms: iOS 14+. Choose [preferred asset representation mode](https://developer.apple.com/documentation/photokit/phpickerconfigurationassetrepresentationmode) to use when loading assets. Default: `ImagePicker.UIImagePickerPreferredAssetRepresentationMode.Automatic` |
| presentationStyle(optional) | [UIImagePickerPresentationStyle](#uiimagepickerpresentationstyle) | Supported platforms: iOS. Choose [presentation style](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle?language=objc) to customize view during taking photo/video. Default: `ImagePicker.UIImagePickerPresentationStyle.Automatic` |
| quality(optional) | `number` | Supported platforms: Android, iOS. Specify the quality of compression, from `0` to `1`. `0` means compress for small size, `1` means compress for maximum quality. Note: If the selected image has been compressed before, the size of the output file may be bigger than the size of the original image. Note: On iOS, if a .bmp or .png image is selected from the library, this option is ignored. Default: `1.0` |
| selectionLimit(optional) | `number` | Supported platforms: Android, iOS 14+. The maximum number of items that user can select. Applicable when `allowsMultipleSelection` is enabled. Setting the value to `0` sets the selection limit to the maximum that the system supports. Default: `0` |
| shape(optional) | [CropShape](#cropshape) | Supported platforms: Android. Specify the shape of the crop area if the user is allowed to edit the image (by passing `allowsEditing: true`). This option is only applicable on Android. Default: `rectangle` |
| shouldDownloadFromNetwork(optional) | `boolean` | Supported platforms: iOS. When enabled, allows the picker to access and download media from iCloud or other remote sources if the asset is not stored locally on the device. For videos, this option applies only when [`videoExportPreset`](#videoexportpreset) is set to `Passthrough`. In all other cases, the video will be downloaded from iCloud automatically. Default: `false` |
| videoExportPreset(optional) | [VideoExportPreset](#videoexportpreset) | Deprecated: See videoExportPreset in Apple documentation. . Supported platforms: iOS 11+. Specify preset which will be used to compress selected video. Default: `ImagePicker.VideoExportPreset.Passthrough` |
| videoMaxDuration(optional) | `number` | Maximum duration, in seconds, for video recording. Setting this to `0` disables the limit. Defaults to `0` (no limit).

-   **On iOS**, when `allowsEditing` is set to `true`, maximum duration is limited to 10 minutes. This limit is applied automatically, if `0` or no value is specified.
-   **On Android**, effect of this option depends on support of installed camera app.
-   **On Web** this option has no effect - the limit is browser-dependant.

 |
| videoQuality(optional) | [UIImagePickerControllerQualityType](#uiimagepickercontrollerqualitytype) | Supported platforms: iOS. Specify the quality of recorded videos. Defaults to the highest quality available for the device. Default: `ImagePicker.UIImagePickerControllerQualityType.High` |

### `ImagePickerResult`

Supported platforms: Android, iOS, Web.

Literal Type: `union`

Type representing successful and canceled pick result.

Acceptable values are: [ImagePickerSuccessResult](#imagepickersuccessresult) | [ImagePickerCanceledResult](#imagepickercanceledresult)

### `ImagePickerSuccessResult`

Supported platforms: Android, iOS, Web.

Type representing successful pick result.

| Property | Type | Description |
| --- | --- | --- |
| assets | [ImagePickerAsset[]](#imagepickerasset) | An array of picked assets. |
| canceled | `false` | Boolean flag set to `false` showing that the request was successful. |

### `MediaLibraryPermissionResponse`

Supported platforms: Android, iOS, Web.

Extends `PermissionResponse` type exported by `expo-modules-core`, containing additional iOS-specific field.

Type: `PermissionResponse` extended by:

| Property | Type | Description |
| --- | --- | --- |
| accessPrivileges(optional) | `'all' | 'limited' | 'none'` | Indicates if your app has access to the whole or only part of the photo library. Possible values are:
-   `'all'` if the user granted your app access to the whole photo library
-   `'limited'` if the user granted your app access only to selected photos (only available on Android API 34+ and iOS 14.0+)
-   `'none'` if user denied or hasn't yet granted the permission

 |

### `MediaType`

Supported platforms: Android, iOS, Web.

Literal Type: `string`

Media types that can be picked by the image picker.

-   `'images'` - for images.
-   `'videos'` - for videos.
-   `'livePhotos'` - for live photos (iOS only).

> When the `livePhotos` type is added to the media types array and a live photo is selected, the resulting `ImagePickerAsset` will contain an unaltered image and the `pairedVideoAsset` field will contain a video asset paired with the image. This option will be ignored when the `allowsEditing` option is enabled. Due to platform limitations live photos are returned at original quality, regardless of the `quality` option.

> When on Android or Web `livePhotos` type passed as a media type will be ignored.

Acceptable values are: `'images'` | `'videos'` | `'livePhotos'`

### `PermissionExpiration`

Supported platforms: Android, iOS, Web.

Literal Type: `union`

Permission expiration time. Currently, all permissions are granted permanently.

Acceptable values are: `'never'` | `number`

### `PermissionHookOptions`

Supported platforms: Android, iOS, Web.

Literal Type: `union`

Acceptable values are: `PermissionHookBehavior` | `Options`

### `PermissionResponse`

Supported platforms: Android, iOS, Web.

An object obtained by permissions get and request functions.

| Property | Type | Description |
| --- | --- | --- |
| canAskAgain | `boolean` | Indicates if user can be asked again for specific permission. If not, one should be directed to the Settings app in order to enable/disable the permission. |
| expires | `PermissionExpiration` | Determines time when the permission expires. |
| granted | `boolean` | A convenience boolean that indicates if the permission is granted. |
| status | `PermissionStatus` | Determines the status of the permission. |

## Enums

### `CameraType`

Supported platforms: Android, iOS, Web.

#### `back`

`CameraType.back = "back"`

Back/rear camera.

#### `front`

`CameraType.front = "front"`

Front camera

> **Deprecated:** To set media types available in the image picker use an array of [`MediaType`](#mediatype) instead.

### `MediaTypeOptions`

Supported platforms: Android, iOS, Web.

#### `All`

`MediaTypeOptions.All = "All"`

Images and videos.

#### `Images`

`MediaTypeOptions.Images = "Images"`

Only images.

#### `Videos`

`MediaTypeOptions.Videos = "Videos"`

Only videos.

### `PermissionStatus`

Supported platforms: Android, iOS, Web.

#### `DENIED`

`PermissionStatus.DENIED = "denied"`

User has denied the permission.

#### `GRANTED`

`PermissionStatus.GRANTED = "granted"`

User has granted the permission.

#### `UNDETERMINED`

`PermissionStatus.UNDETERMINED = "undetermined"`

User hasn't granted or denied the permission yet.

### `UIImagePickerControllerQualityType`

Supported platforms: Android, iOS, Web.

#### `High`

`UIImagePickerControllerQualityType.High = 0`

Highest available resolution.

#### `Medium`

`UIImagePickerControllerQualityType.Medium = 1`

Depends on the device.

#### `Low`

`UIImagePickerControllerQualityType.Low = 2`

Depends on the device.

#### `VGA640x480`

`UIImagePickerControllerQualityType.VGA640x480 = 3`

640 × 480

#### `IFrame1280x720`

`UIImagePickerControllerQualityType.IFrame1280x720 = 4`

1280 × 720

#### `IFrame960x540`

`UIImagePickerControllerQualityType.IFrame960x540 = 5`

960 × 540

### `UIImagePickerPreferredAssetRepresentationMode`

Supported platforms: iOS.

Picker preferred asset representation mode. Its values are directly mapped to the [`PHPickerConfigurationAssetRepresentationMode`](https://developer.apple.com/documentation/photokit/phpickerconfigurationassetrepresentationmode).

#### `Automatic`

`UIImagePickerPreferredAssetRepresentationMode.Automatic = "automatic"`

A mode that indicates that the system chooses the appropriate asset representation.

#### `Compatible`

`UIImagePickerPreferredAssetRepresentationMode.Compatible = "compatible"`

A mode that uses the most compatible asset representation.

#### `Current`

`UIImagePickerPreferredAssetRepresentationMode.Current = "current"`

A mode that uses the current representation to avoid transcoding, if possible.

### `UIImagePickerPresentationStyle`

Supported platforms: iOS.

Picker presentation style. Its values are directly mapped to the [`UIModalPresentationStyle`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle).

#### `AUTOMATIC`

Supported platforms: iOS.

`UIImagePickerPresentationStyle.AUTOMATIC = "automatic"`

The default presentation style chosen by the system. On older iOS versions, falls back to `WebBrowserPresentationStyle.FullScreen`.

#### `CURRENT_CONTEXT`

`UIImagePickerPresentationStyle.CURRENT_CONTEXT = "currentContext"`

A presentation style where the picker is displayed over the app's content.

#### `FORM_SHEET`

`UIImagePickerPresentationStyle.FORM_SHEET = "formSheet"`

A presentation style that displays the picker centered in the screen.

#### `FULL_SCREEN`

`UIImagePickerPresentationStyle.FULL_SCREEN = "fullScreen"`

A presentation style in which the presented picker covers the screen.

#### `OVER_CURRENT_CONTEXT`

`UIImagePickerPresentationStyle.OVER_CURRENT_CONTEXT = "overCurrentContext"`

A presentation style where the picker is displayed over the app's content.

#### `OVER_FULL_SCREEN`

`UIImagePickerPresentationStyle.OVER_FULL_SCREEN = "overFullScreen"`

A presentation style in which the picker view covers the screen.

#### `PAGE_SHEET`

`UIImagePickerPresentationStyle.PAGE_SHEET = "pageSheet"`

A presentation style that partially covers the underlying content.

#### `POPOVER`

`UIImagePickerPresentationStyle.POPOVER = "popover"`

A presentation style where the picker is displayed in a popover view.

### `VideoExportPreset`

Supported platforms: Android, iOS, Web.

#### `Passthrough`

`VideoExportPreset.Passthrough = 0`

Resolution: **Unchanged** • Video compression: **None** • Audio compression: **None**

#### `LowQuality`

`VideoExportPreset.LowQuality = 1`

Resolution: **Depends on the device** • Video compression: **H.264** • Audio compression: **AAC**

#### `MediumQuality`

`VideoExportPreset.MediumQuality = 2`

Resolution: **Depends on the device** • Video compression: **H.264** • Audio compression: **AAC**

#### `HighestQuality`

`VideoExportPreset.HighestQuality = 3`

Resolution: **Depends on the device** • Video compression: **H.264** • Audio compression: **AAC**

#### `H264_640x480`

`VideoExportPreset.H264_640x480 = 4`

Resolution: **640 × 480** • Video compression: **H.264** • Audio compression: **AAC**

#### `H264_960x540`

`VideoExportPreset.H264_960x540 = 5`

Resolution: **960 × 540** • Video compression: **H.264** • Audio compression: **AAC**

#### `H264_1280x720`

`VideoExportPreset.H264_1280x720 = 6`

Resolution: **1280 × 720** • Video compression: **H.264** • Audio compression: **AAC**

#### `H264_1920x1080`

`VideoExportPreset.H264_1920x1080 = 7`

Resolution: **1920 × 1080** • Video compression: **H.264** • Audio compression: **AAC**

#### `H264_3840x2160`

`VideoExportPreset.H264_3840x2160 = 8`

Resolution: **3840 × 2160** • Video compression: **H.264** • Audio compression: **AAC**

#### `HEVC_1920x1080`

`VideoExportPreset.HEVC_1920x1080 = 9`

Resolution: **1920 × 1080** • Video compression: **HEVC** • Audio compression: **AAC**

#### `HEVC_3840x2160`

`VideoExportPreset.HEVC_3840x2160 = 10`

Resolution: **3840 × 2160** • Video compression: **HEVC** • Audio compression: **AAC**

## Permissions

### Android

The following permissions are added automatically through the library's **AndroidManifest.xml**.

| Android Permission | Description |
| --- | --- |
| `CAMERA` | Required to be able to access the camera device. |
| `READ_EXTERNAL_STORAGE` | Allows an application to read from external storage. |
| `WRITE_EXTERNAL_STORAGE` | Allows an application to write to external storage. |

### iOS

The following usage description keys are used by the APIs in this library.

| Info.plist Key | Description |
| --- | --- |
| `NSMicrophoneUsageDescription` | A message that tells the user why the app is requesting access to the device’s microphone. |
| `NSPhotoLibraryUsageDescription` | A message that tells the user why the app is requesting access to the user’s photo library. |
| `NSCameraUsageDescription` | A message that tells the user why the app is requesting access to the device’s camera. |
