Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-image-picker

expo1.3mMIT16.0.6TypeScript support: included

Provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.

react-native, expo, image, picker, image-picker

readme

expo sdk

Expo

Expo SDK version Chat or ask a question License: MIT Downloads

Try Expo in the Browser  •  Read the Documentation  •  Learn more on our blog  •  Request a feature

Follow us on

Expo on X   Expo on GitHub   Expo on Reddit   Expo on LinkedIn   Expo on LinkedIn

Introduction

Expo is an open-source platform for making universal native apps that run on Android, iOS, and the web. It includes a universal runtime and libraries that let you build native apps by writing React and JavaScript.

This repository includes the Expo SDK, Modules API, Go app, CLI, Router, documentation, and various other supporting tools. Expo Application Services (EAS) is a platform of hosted services that are deeply integrated with Expo open source tools. EAS helps you build, ship, and iterate on your app as an individual or a team.

Read the Expo Community Guidelines before interacting in the repository. Thank you for helping keep the Expo community open and welcoming!

Table of contents

📚 Documentation

Learn about building and deploying universal apps in our official docs!

🗺 Project Layout

  • packages All the source code for Expo modules, if you want to edit a library or just see how it works this is where you'll find it.
  • apps This is where you can find Expo projects which are linked to the development modules. You'll do most of your testing in here.
  • apps/expo-go This is where you can find the source code for Expo Go.
  • apps/expo-go/ios/Exponent.xcworkspace is the Xcode workspace. When developing iOS, always open this instead of Exponent.xcodeproj because the workspace also loads the CocoaPods dependencies.
  • docs The source code for https://docs.expo.dev
  • templates The template projects you get when you run npx create-expo-app
  • react-native-lab This is our fork of react-native used to build Expo Go.
  • guides In-depth tutorials for advanced topics like contributing to the client.
  • tools contain build and configuration tools.
  • template-files contains templates for files that require private keys. They are populated using the keys in template-files/keys.json.
  • template-files/ios/dependencies.json specifies the CocoaPods dependencies of the app.

🏅 Badges

Let everyone know your app can be run instantly in the Expo Go app!

runs with Expo Go

runs with Expo Go

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-000.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

👏 Contributing

If you like Expo and want to help make it better then check out our contributing guide! Check out the CLI package to work on the Expo CLI.

❓ FAQ

If you have questions about Expo and want answers, then check out our Frequently Asked Questions!

If you still have questions you can ask them on our Discord and Forums or X @expo.

💙 The Team

Curious about who makes Expo? Here are our team members!

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.

Star the Expo repo on GitHub to support the project

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

16.0.6 — 2025-02-10

This version does not introduce any user-facing changes.

16.0.5 — 2025-01-31

🐛 Bug fixes

  • [ios] fixed concurrency freeze on low-end iOS devices when selecting multiple images. (#34585 by @chrfalch)
  • [android] fixed removal of temporary file after picking image using camera (#34797 by @chrfalch)

16.0.4 — 2025-01-10

This version does not introduce any user-facing changes.

16.0.3 — 2024-11-22

This version does not introduce any user-facing changes.

16.0.2 — 2024-11-14

This version does not introduce any user-facing changes.

16.0.1 — 2024-11-04

🐛 Bug fixes

  • Fix incorrect width/height reported with EXIF tags 5 and 7 (#32534 by @gaearon)

16.0.0 — 2024-10-22

🛠 Breaking changes

  • Remove READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions. (#31902 by @aleqsio)
  • Bumped iOS deployment target to 15.1. (#30840 by @tsapeta)
  • The default value for quality option has been changed from 0.2 to 1.0 for better performance and to match the most common expectation. (#30896 by @tsapeta)
  • ImagePicker.MediaTypeOptions have been deprecated. Use a single MediaType or an array of MediaTypes instead. (#30957 by @behenate)

🎉 New features

  • [web] Include file object from input for server uploads. (#31788 by @EvanBacon)
  • [iOS] Add support for picking live photos from the library. (#30957 by @behenate)

🐛 Bug fixes

  • [iOS] Provide more image metadata in the result object. (#29648 by @vonovak)
  • Only import from expo/config-plugins to follow proper dependency chains. (#30499 by @byCedric)
  • [web] Return missing values from video selection. (#30966 by @entiendoNull)
  • [Android] Fix permissions on devices running Android 11 and 12. (#31396 by @alanjhughes)

💡 Others

  • Refactored the code on iOS and made promise resolution faster. (#30896 by @tsapeta)

15.0.7 - 2024-07-03

🐛 Bug fixes

  • [iOS] Fix an issue where the app will crash when using the popover presentation style on iPad. (#29892 by @alanjhughes)

15.0.6 - 2024-06-20

🐛 Bug fixes

15.0.5 — 2024-05-15

🐛 Bug fixes

15.0.4 — 2024-05-01

This version does not introduce any user-facing changes.

15.0.3 — 2024-04-29

🎉 New features

  • Add new legacy option to ImagePickerOptions to allow using the legacy image picker on android. (#28514 by @alanjhughes)

🐛 Bug fixes

  • Fixed type exports for isolatedModules option in typescript (#28499 by @megacherry)
  • On Android, fixed an issue where multiple pickers could be opened, causing a crash. (#28509 by @haileyok)

15.0.2 — 2024-04-23

This version does not introduce any user-facing changes.

15.0.1 — 2024-04-22

🐛 Bug fixes

  • Fixed an issue where cropped images were not returning file size and file name on Android. (#28352 by @fobos531)

15.0.0 — 2024-04-18

🎉 New features

  • Add ability to disable permissions in config plugin by passing false instead of permission messages. (#28107 by @EvanBacon)

🐛 Bug fixes

  • On Android fileSize was named filesize which did not match the docs & typescript definition. (#27293 by @WookieFPV)
  • Fixed cancelled picker dialog not resolving with expected result on web. (#11847 by @raqso)

💡 Others

  • drop unused web name property. (#27437 by @EvanBacon)
  • Convert WEBP to PNG instead JPEG when selecting an item in the Media Library with editing enabled. (#26419 by @NikitaDudin)
  • Receiving a correct file extension for WEBP files instead .jpeg in the ImagePicker result. (#26419 by @NikitaDudin)
  • Removed deprecated backward compatible Gradle settings. (#28083 by @kudo)

14.7.1 - 2023-12-19

This version does not introduce any user-facing changes.

14.7.0 — 2023-11-14

🛠 Breaking changes

14.6.0 — 2023-10-17

🛠 Breaking changes

🎉 New features

14.5.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)

🐛 Bug fixes

  • On Android, the Uri type is not serializable and causes a crash when recreating the activity. (#23768 by @alanjhughes)

💡 Others

14.4.1 — 2023-08-02

This version does not introduce any user-facing changes.

14.4.0 — 2023-07-28

This version does not introduce any user-facing changes.

14.3.2 - 2023-07-23

💡 Others

14.3.1 - 2023-07-04

🐛 Bug fixes

14.3.0 — 2023-06-13

🎉 New features

🐛 Bug fixes

  • Fixed Android build warnings for Gradle version 8. (#22537, #22609 by @kudo)
  • Fixed an issue that allowed picking non-image/video files when passing MediaTypeOptions.All (#22606 by @fobos531)

14.2.0 — 2023-05-08

🎉 New features

🐛 Bug fixes

  • Fix images unexpectedly being converted to .png when opening .bmp files and selecting any quality in ImagePickerOptions. (#21361 by @behenate)
  • Fix issue where the array of permissions could end up empty causing an exception. (#21589 by @alanhughes)
  • Fix rotated videos returning incorrect width/height. #12573 (#21758 by @mmmulani)
  • Fix NullPointerException for launchCameraAsync on Android 13. (#22123 by @witheroux)
  • [Android] Fix image picker returning inverted dimensions when selecting vertical images without editing. (#22383 by @behenate)

14.1.1 — 2023-02-09

⚠️ Notices

  • Removed deprecated fields from pick result type and deprecated UIImagePickerPresentationStyle enum values. (#21078 by @Simek)

14.1.0 — 2023-01-26

🎉 New features

💡 Others

  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

14.0.3 — 2022-12-30

💡 Others

14.0.2 - 2022-11-21

🐛 Bug fixes

14.0.1 - 2022-11-08

🐛 Bug fixes

14.0.0 — 2022-10-25

🛠 Breaking changes

  • Remove deprecated requestCameraRollPermissionsAsync and getCameraRollPermissionsAsync methods, as well as associated to them CameraRollPermissionResponse type. (#18600 by @Simek)
  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)
  • Reworked the picking result object for simplicity and better compatibility with the multiple selection. (#19570 by @tsapeta)

🎉 New features

  • The new PHPickerViewController is now default picker interface on iOS 14+. (#18871 by @barthap)

🐛 Bug fixes

  • Fix images taken with launchCameraAsync being translated incorrectly on some camera orientations. (#19185 by @jacobjaffe and @reececox)
  • Fix error where launchImageLibraryAsync() saved the photo to a global cache directory that was inaccessible in Expo Go. (#19205 by @aleqsio)

💡 Others

  • Drop @expo/config-plugins dependency in favor of peer dependency on expo. (#18595 by @EvanBacon)

13.3.1 — 2022-07-25

This version does not introduce any user-facing changes.

13.3.0 — 2022-07-16

🎉 New features

  • On iOS 14+ added support for selection limit and on iOS 15+ for ordered selection. (#18142, #18143 by @barthap)
  • The picker now resolves media library asset ID. (#18236, #18185 by @barthap)
  • On iOS, the picker now resolves file name and size and media library asset ID. (#18179 by @barthap)
  • On Android added support for selecting multiple images/videos. (#18161 by @bbarthec)

🐛 Bug fixes

  • On Android restored support for allowsEditing option that was disabled when migrating to registerForActivityResult mechanism. (#17963 by @bbarthec)

13.2.1 — 2022-07-11

This version does not introduce any user-facing changes.

13.2.0 — 2022-07-07

🎉 New features

🐛 Bug fixes

💡 Others

  • On Android migrated to the new registerForActivityResult mechanism. This migration disables allowsEditing option. (#17671, (#17987 by @bbarthec)
  • Native module on Android is now written in Kotlin using Sweet API. (#17668 by @bbarthec)
  • Migrated Expo modules definitions to the new naming convention. (#17193 by @tsapeta)

13.1.1 — 2022-04-27

This version does not introduce any user-facing changes.

13.1.0 — 2022-04-25

🎉 New features

13.0.1 — 2022-04-20

This version does not introduce any user-facing changes.

13.0.0 — 2022-04-18

🛠 Breaking changes

  • On Android migrated cropping library from com.theartofdev.edmodo:android-image-cropper@2.8.0 (available from jcenter()) to com.github.CanHub:Android-Image-Cropper@1.1.1 (available from jitpack.io). (#11647 by @bbarthec)

🎉 New features

  • Native module on iOS is now written in Swift using the new API. (#15977 by @bbarthec)

🐛 Bug fixes

  • Fixed crashes on Android after image is picked by adding missing dependency expo-image-loader. (#17019 by @M1ST4KE)
  • Fix failure on Android when allowsEditing is true and non-jpeg file picked. (#16615 by @mnightingale)

⚠ Notices

  • Deleted the UIImagePickerPresentationStyle.BlurOverFullScreen option as it does not work on iOS. (#16925 by @barthap)
  • Deprecated all PascalCase values of the UIImagePickerPresentationStyle enum. Use their SNAKE_UPPERCASE counterparts instead. (#16925 by @barthap)
  • Underlying values of the UIImagePickerPresentationStyle are now strings. They were integers before. (#16925 by @barthap)

💡 Others

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

12.0.2 - 2022-02-01

🐛 Bug fixes

  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

12.0.1 — 2021-12-15

🐛 Bug fixes

  • Fix unresolved promise when picker was dismissed with a swipe-down on iOS. (#15511 by @barthap)

12.0.0 — 2021-12-03

🛠 Breaking changes

  • Remove typo workaround for getMediaLibaryPermissionsAsync method. (#14646 by @Simek)

🐛 Bug fixes

  • On Web add missing cancelled property to the return values of launchCameraAsync and launchImageLibraryAsync methods. (#14646 by @Simek)

💡 Others

  • Export missing types: ImageInfo, ImagePickerMultipleResult, OpenFileBrowserOptions, ExpandImagePickerResult, UIImagePickerControllerQualityType and UIImagePickerPresentationStyle. (#14646 by @Simek)
  • Extract return object containing { cancelled: true } to separate type ImagePickerCancelledResult for launchCameraAsync and launchImageLibraryAsync methods. (#14646 by @Simek)

11.0.1 — 2021-10-01

This version does not introduce any user-facing changes.

11.0.0 — 2021-09-28

🛠 Breaking changes

🎉 New features

  • Add useCameraPermissions and useMediaLibraryPermissions hooks from modules factory. (#13859 by @bycedric)
  • Add possibility to change presentation style on iOS. (#14068 by @mstach60161)

🐛 Bug fixes

  • Add missing GPSHPositioningError exif parameter on Android. (#13998 by @mstach60161)
  • Fix promise not resolving when the app is moved to the background on Android. (#13975 by @mstach60161)
  • Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)

💡 Others

10.2.0 — 2021-06-16

🐛 Bug fixes

💡 Others

  • Migrated from unimodules-file-system-interface and unimodules-permissions-interface to expo-modules-core. (#12961 by @tsapeta)
  • Migrated from AsyncTask to Kotlin concurrency utilities. (#13800 by @m1st4ke)

10.1.3 — 2021-04-13

This version does not introduce any user-facing changes.

10.1.2 — 2021-04-09

🐛 Bug fixes

10.1.1 — 2021-03-31

This version does not introduce any user-facing changes.

10.1.0 — 2021-03-10

🎉 New features

  • Converted plugin to TypeScript. (#11715 by @EvanBacon)
  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)

🐛 Bug fixes

  • Fixed launchCameraAsync() with allowsEditing option crashing for some android users. (#11825 by @lukmccall)
  • Fixed cancelled picker dialog not resolving with expected result on web. (#11847 by @jayprado)
  • Fixed incorrect file URI on Android. (#11823 by @lukmccall)

10.0.0 — 2021-01-15

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

9.2.1 — 2020-12-09

🐛 Bug fixes

9.2.0 — 2020-11-17

This version does not introduce any user-facing changes.

9.1.1 — 2020-09-23

🐛 Bug fixes

  • launchImageLibraryAsync() should be callable with no options argument (#10306)

9.1.0 — 2020-08-18

🎉 New features

  • Added a way to handle results when activity was killed by the android. (#9697 by @lukmccall)

🐛 Bug fixes

  • Return array of ImagePickerResult when allowsMultipleSelection is set to true on Web. (#9402 by @isthaison)
  • video recorded on iOS recorded was producing low resolution videos, not it's fixed, and can be configured via the videoQuality option. (#9808 by @vujevits)

9.0.0 — 2020-08-11

🛠 Breaking changes

  • Added camera and external storage permissions declarations to AndroidManifest.xml on Android. (#9230 by @bycedric)

🎉 New features

  • Added support for the limited CAMERA_ROLL permission on iOS 14. (#9423 by @lukmccall)
  • Added videoMaxDuration option to launchCameraAsync() to configure video recording duration limit. (#9486 by @barthap)

8.4.0 — 2020-07-27

🐛 Bug fixes

  • Fixed downsizing cropped image, when allowsEditing was true. (#9316 by @barthap)

8.3.0 — 2020-05-29

This version does not introduce any user-facing changes.

8.2.0 — 2020-05-27

🛠 Breaking changes

  • The base64 output will no longer contain newline and special character (\n, \r) on Android. (#7841 by @jarvisluong)

🐛 Bug fixes

  • Skip asking for camera permissions on web with ImagePicker.getCameraPermissionsAsync. (#8475 by @EvanBacon)
  • Fixed exception when calling ImagePicker.getCameraPermissionsAsync on Web. (#7498 by @IjzerenHein)