How to select Multiple images from UIImagePickerController
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
UIImagePickerController does not support multiple image selection. If you need users to choose more than one photo, the modern iOS answer is PHPickerViewController, which was designed for privacy-aware photo picking and supports multiple selection directly. For older codebases, the main lesson is not how to “hack” UIImagePickerController, but when to replace it with the right API.
Why UIImagePickerController Is the Wrong Tool
UIImagePickerController was built for:
- taking a photo
- choosing a single photo or video
- simple media-picking flows
It does not expose a built-in multiple-selection mode. If your requirement is “select several images from the library,” then the API mismatch is the problem.
Use PHPickerViewController
For modern apps, use PHPickerViewController.
selectionLimit = 0 means unlimited selection. Set it to a positive number if you want a cap.
Loading the Selected Images
The results contain item providers. Load each image asynchronously.
This is the normal pattern for actually retrieving the chosen assets into your app.
Privacy Advantage
PHPickerViewController is not just more capable. It also has a better privacy story. It lets users select photos without your app needing broad direct photo-library access in the same way older flows often did.
That is one reason it is the recommended replacement rather than just a feature upgrade.
What About Older iOS Versions
If you must support iOS versions before PHPickerViewController, you usually have two realistic options:
- use a custom photo-selection UI based on Photos framework APIs
- adopt a well-maintained third-party picker built on top of those APIs
Trying to force UIImagePickerController into multiple selection is not the right approach because the underlying API was not designed for it.
UIImagePickerController Still Has a Place
It is still useful when you need:
- camera capture
- simple single image selection
- compatibility with older single-item flows
The point is not that the class is useless. The point is that multiple image selection is not its feature set.
Configuration Options in PHPicker
You can also refine the picker behavior.
That lets you:
- restrict to images
- cap the selection count
- align the picker behavior with your product needs
Think About Result Handling
Selecting multiple images is only the beginning. A real implementation also needs to think about:
- memory usage
- thumbnail generation
- upload ordering
- duplicate user selections across sessions
If users can pick many large photos, loading everything at full resolution immediately can create memory pressure. Often you want thumbnails first and full data only when necessary.
Common Pitfalls
The biggest mistake is assuming UIImagePickerController has a hidden multiple-selection setting. It does not. Another is migrating to PHPickerViewController but then forgetting that image loading is asynchronous through item providers. Developers also often ignore memory implications when many images are selected at once. Finally, multiple selection and camera capture are separate use cases; PHPicker is about picking from the library, not replacing every UIImagePickerController scenario.
Summary
- '
UIImagePickerControllerdoes not support multiple image selection.' - Use
PHPickerViewControllerfor multiple image picking in modern iOS code. - Set
selectionLimitto control how many images the user may choose. - Load selected images asynchronously from item providers.
- Keep
UIImagePickerControllerfor single-item or camera-focused flows, not bulk library selection.

