image_picker
1.2.4, released 6 weeks ago by flutter.dev
Flutter plugin for selecting images/videos from the gallery and capturing new ones via camera.
What it does
Provides APIs to pick single or multiple images, videos, or mixed media from the device's library or take new photos and videos using the camera. It returns cross-platform XFile objects representing the selected media.
AI-written summary of version 1.2.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need users to select existing photos or videos from their device gallery.
- Your app requires taking new pictures or recording videos using the device camera.
- You need cross-platform support for picking media across mobile, web, and desktop.
Skip it when
- You need full in-app custom camera viewfinders and advanced hardware controls instead of a simple photo-capture intent.
- You require complex image editing, filtering, or heavy image manipulation out of the box.
Strengths
- Supports multiple platform implementations (Android, iOS, Web, Windows, macOS, Linux).
- Handles lost data recovery on Android when low-memory kills the application.
- Uses modern native pickers such as PHPicker on iOS and Android Photo Picker on newer versions.
Weaknesses
- Desktop platforms have limited support and require a third-party camera delegate for capturing photos.
- Android low-memory process death requires manual implementation of retrieveLostData checks.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Requires iOS Info.plist permission descriptions for photo library, camera, and microphone. macOS requires user-selected files read-only entitlement. Android requires no configuration out of the box.
final picker = ImagePicker();
final XFile? image = await picker.pickImage(source: ImageSource.gallery);Alternatives
Packages that do the same job and could replace image_picker.
- image
If you need to decode, manipulate, and convert image formats directly in Dart code.
96Compare - extended_image
If you need advanced image loading, zooming, panning, and cropping widgets.
80Compare
Works with
Packages commonly used together with image_picker: ones it builds on, ones built on it, and its own family.
- image_picker_for_webimage_picker depends on itWeb implementation of image_picker that lets users select images or videos via the browser file picker.
- image_picker_windowsimage_picker depends on itWindows implementation of image_picker for selecting images and videos
- image_picker_iosimage_picker depends on itiOS implementation of the image_picker plugin.
- image_picker_macosimage_picker depends on itmacOS platform implementation of the image_picker plugin
- image_picker_androidimage_picker depends on itAndroid implementation of the image_picker plugin for selecting photos and videos.
- stream_chat_flutterBuilt on image_pickerFull-featured Flutter UI SDK for Stream Chat, providing ready‑made chat widgets and theming.
- flutter_zxingBuilt on image_pickerBarcode and QR code scanner and generator using Dart FFI and ZXing C++.
- flutter_quill_extensionsBuilt on image_pickerEmbed extensions for flutter_quill to support loading images and videos