How to Add an Image Picker to Your Expo App: Photo Library and Camera with expo-image-picker

DavidDavid October 10, 2026 8 min read

How to add an image picker to your Expo app, in short

You add an image picker to an Expo app with one package: expo-image-picker. It opens the phone's own photo picker or camera and hands your app a local file. The setup is four steps: install the package, set the usage messages in your app config, call launchImageLibraryAsync or launchCameraAsync from a button press, and read the result. If the user picked something, result.canceled is false and result.assets holds the photo with its uri, width, height and file size.

The code is short. The parts that cause trouble are around it: asking for permissions you do not need, uploading full-size photos straight off a modern phone camera, and losing the picked image on Android when the system reclaims memory. This guide covers all three, because those are what turn a working demo into a support headache or an App Review note.

Step 1: Install expo-image-picker and set the usage messages

Install the package with the Expo installer so you get the version that matches your SDK. Then register its config plugin in app.json or app.config.js. The plugin sets the iOS usage descriptions, the sentences iOS shows when your app asks for access. These are part of the app binary, so changing them needs a new native build, not an over-the-air update.

  1. Run: npx expo install expo-image-picker
  2. In app.json, add to the plugins array: ["expo-image-picker", { "photosPermission": "Allow $(PRODUCT_NAME) to access your photos so you can set a profile picture.", "cameraPermission": "Allow $(PRODUCT_NAME) to use your camera so you can take a profile picture.", "microphonePermission": false }]
  3. photosPermission sets NSPhotoLibraryUsageDescription, cameraPermission sets NSCameraUsageDescription, and microphonePermission sets NSMicrophoneUsageDescription.
  4. Rebuild the native app with EAS Build so the new strings are in the binary.

Write each usage message about what the user gets. Guideline 5.1.1(ii) asks that purpose strings clearly and completely describe how the data is used, so "to set a profile picture" beats "this app needs your photos". If you manage the ios folder yourself instead of using Continuous Native Generation, add the three keys to Info.plist by hand.

Step 2: Pick from the photo library

Call launchImageLibraryAsync from a button press. It returns a promise with { canceled, assets }. When the user backs out, canceled is true and assets is null. Otherwise assets is an array, even when the user picked one photo, so read result.assets[0].

launchImageLibraryAsync options most apps need (per Expo's ImagePicker reference)

OptionWhat it does
mediaTypesWhat can be picked: 'images', 'videos', or both as an array. Defaults to 'images'
allowsEditingShows a crop step after picking. On iOS the crop is always square; on Android aspect sets the ratio
qualityCompression from 0 to 1. Defaults to 1, maximum quality. Ignored on iOS for .png and .bmp files
allowsMultipleSelectionLets the user pick several items (iOS 14+). Cannot be combined with allowsEditing
selectionLimitMaximum number of items when multiple selection is on. 0 means the system maximum
base64Also returns the image as a Base64 string. Leave off unless you truly need it

For a profile picture: images only, allowsEditing true, quality around 0.7. For a photo journal or listing app: allowsMultipleSelection with a selectionLimit, no editing. Pick one shape per screen; trying to support crop and multi-select on the same button is how you end up fighting the library.

About permissions: on iOS the photo library picker runs outside your app, and Expo's own sample notes that no permission request is necessary just to launch it. This is exactly what Apple wants. Guideline 5.1.1(iii) says to use the out-of-process picker where possible rather than requesting full access to protected resources like Photos. The exception, per Expo's docs: in SDK 54 and later, picking a video with the default settings (allowsEditing false, videoExportPreset Passthrough) returns the original file, iOS needs library permission for that, and it shows the prompt right after the user selects. If you allow videos, call requestMediaLibraryPermissionsAsync before opening the picker so the prompt is not a surprise.

Step 3: Take a photo with the camera

launchCameraAsync opens the system camera and returns the same result shape. Unlike the library picker, camera access always needs the user's permission. Call requestCameraPermissionsAsync, or use the useCameraPermissions hook, and only open the camera when granted is true.

  • Ask at the moment the user taps "Take photo", not on app launch. A prompt with an obvious reason is one the user understands, which is the whole point of asking in context.
  • If granted is false and canAskAgain is false, iOS will not show the prompt again. Show your own message with a link to Settings instead of a dead button.
  • Use cameraType to open the front camera for selfies and the back camera for everything else.
  • The iOS Simulator has no camera, so test this path on a real device.

The full permission pattern, including the Settings fallback, is in [how to request permissions in your Expo app](/blog/how-to-request-permissions-in-your-expo-app). If you need a live camera view inside your own screen (a scanner, a custom shutter, filters), that is a different package, expo-camera. expo-image-picker is the right tool when the system camera UI is fine and you just want the photo.

Step 4: Show it, shrink it, then upload it

The asset's uri points to a local file on the device. You can show it straight away with an Image component, which makes the screen feel instant. Uploading is a separate step, and it is where most image features go wrong.

  1. Show a preview from the local uri immediately, with a loading state while the upload runs.
  2. Shrink before you upload. Lower quality in the picker options, and resize with expo-image-manipulator if you only need a thumbnail or avatar. Expo's own sample result shows a picked photo at 3024 by 3025 pixels and roughly 6 MB; an avatar does not need that.
  3. Upload the file to your storage: Supabase Storage, S3 or Firebase Storage. Expo's docs link to example projects for S3 and Firebase uploads; for anything else, follow your storage provider's React Native upload docs.
  4. Save the stored file's path or URL in your database, not the local uri. The local file lives in the app's cache and is not a permanent address.
  5. Handle failure: keep the picked asset in state so the user can retry without picking again.

If your backend is Supabase, set storage policies the same way you set row-level security on tables, so a user can only write to their own folder. The [Supabase with Expo](/blog/how-to-set-up-supabase-with-expo) guide covers the policy side.

The Android edge case that loses photos

On Android, the system sometimes kills your app's main activity while the picker or camera is open, usually on lower-memory phones. When the user comes back, the picker result is gone and your app looks like it ignored their photo. Expo's docs cover this directly: call ImagePicker.getPendingResultAsync when the screen mounts. On Android it returns the lost result (or an error result) if there is one, and null on other platforms.

You can reproduce it on purpose by turning on "Don't keep activities" in Android developer options, which is the test Expo suggests. It is a small amount of code and saves you from one-star reviews that just say "photo upload doesn't work".

Limited photo access and what it means for you

On iOS 14+ and Android API 34+, users can grant access to only selected photos instead of the whole library. When you do request library permission, the response includes accessPrivileges: 'all', 'limited' or 'none'. With limited access some asset fields, like assetId and fileName, can come back null.

The practical rule: do not build anything that depends on assetId or fileName being present. Generate your own file name when you upload (a user id plus a timestamp is enough), and treat the uri, width and height as the fields you can rely on. If you only use the out-of-process picker for photos, you mostly avoid this whole question, which is one more reason to start there.

How to test the image picker

expo-image-picker is included in Expo Go, so you can try the library picker there while you build. Your custom usage messages only exist in your own build, though, so do a final pass in a development build or [TestFlight](/blog/testflight-beta-testing-guide-for-expo-apps) before you submit. The difference is explained in [Expo Go vs development build](/blog/expo-go-vs-development-build).

  • Cancel the picker and the camera. Nothing should break and no empty image should appear.
  • Deny camera permission, then tap the button again. You should see your own explanation and a Settings link.
  • Pick a large photo and a screenshot, then check the uploaded file sizes in your storage dashboard.
  • On Android, test with "Don't keep activities" on.
  • Check the permission prompts in a real build read like your app, not like the default "Allow $(PRODUCT_NAME) to access your photos".

Have Claude Code build it for you

Open your project in the Claude Code desktop app and give it a spec rather than "add photo upload". A prompt that works:

Add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) like "never add a permission the feature does not use" so a later session does not quietly re-enable the microphone. Then read the permission strings yourself before you build; Claude Code can write them, but you are the one who knows exactly what your app does with the photos.

The short version

To add an image picker to your Expo app: install expo-image-picker, set photosPermission and cameraPermission in its config plugin (and microphonePermission to false if you never record video), call launchImageLibraryAsync or launchCameraAsync from a button, and use result.assets[0].uri when result.canceled is false. Let the system picker handle photo access, ask for camera permission at the moment it is needed, shrink images before upload, and handle the Android pending result.

If you are building your first iOS app with Claude Code and Expo and want a second pair of eyes on your permission prompts before App Review sees them, bring it to App Store Launch Club. Members share their builds for feedback, and the [curriculum](/curriculum) covers the full path from first build to first users. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

Does expo-image-picker work in Expo Go?

Yes. Expo's docs list expo-image-picker as included in Expo Go, so you can test picking photos there. Your custom permission messages only appear in your own build, so check them in a development build or TestFlight before submitting.

Do I need to ask for photo library permission to pick an image?

Not for picking photos on iOS. The library picker runs outside your app, and Expo's sample notes no permission request is needed to launch it. Apple's guideline 5.1.1(iii) recommends this out-of-process picker over full Photos access. The exception is picking videos with the default passthrough settings in SDK 54+, where iOS shows a permission prompt after selection, so request it first if you allow videos.

Why does my Expo app ask for microphone permission when I only pick photos?

expo-image-picker adds the Android RECORD_AUDIO permission by default. Set microphonePermission to false in the config plugin and rebuild. Apple's guideline 5.1.1(iv) specifically says photo-posting apps must not require microphone access to upload photos.

How do I let users pick more than one photo?

Set allowsMultipleSelection to true and optionally a selectionLimit. It is supported on Android and iOS 14+. It cannot be combined with allowsEditing, so multi-select means no crop step.

Why is the crop always square on iOS?

Per Expo's docs, the aspect option only applies on Android. On iOS the system crop rectangle is always a square. If you need a different ratio on iOS, crop after picking with expo-image-manipulator.

Why did the picked photo disappear on Android?

Android can kill your app's activity while the picker is open. Call ImagePicker.getPendingResultAsync when the screen mounts to recover the result. Test it by enabling Don't keep activities in developer options.

Should I upload images as base64?

Usually not. The base64 option loads the full image into memory as a string. Resize the image first and upload from the file uri, unless your storage API specifically needs base64.

Last reviewed by David on October 10, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog