Skip to content
pubscout

image_picker_for_web

3.1.1, released a year ago by flutter.dev

Web implementation of image_picker that lets users select images or videos via the browser file picker.

WASM-readyQuiet but busy
$ flutter pub add image_picker_for_web
Source repository

What it does

Provides the same API as the image_picker package for the web platform. It returns XFile objects that contain Blob URLs or byte data. Supports image and video selection with optional resize/quality parameters where applicable.

AI-written summary of version 3.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to pick images or videos on Flutter web using the familiar image_picker API.
  • You want a single package that works across mobile and web without extra code.

Skip it when

  • You require precise control over image resizing for GIFs or need maxDuration for video capture.
  • You need guaranteed capture behavior across all browsers.

Strengths

  • Seamless API compatibility with image_picker
  • Handles XFile abstraction and Blob URLs automatically
  • Supports multi‑video selection and recent browser features

Weaknesses

  • Resize/quality options limited for GIFs and only affect JPG/WEBP
  • maxDuration not supported for videos on web
  • Behavior depends on browser support for input attributes

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:image_picker/image_picker.dart';
final picker = ImagePicker();
final XFile? file = await picker.pickImage(source: ImageSource.gallery);
if (file != null) {
  final image = kIsWeb ? Image.network(file.path) : Image.file(File(file.path));
}

Alternatives

Packages that do the same job and could replace image_picker_for_web.

Works with

Packages commonly used together with image_picker_for_web: ones it builds on, ones built on it, and its own family.