image_compressor 0.1.0 copy "image_compressor: ^0.1.0" to clipboard
image_compressor: ^0.1.0 copied to clipboard

Compress images to a target file size in Flutter — one call to get an image under X KB. Native speed, zero-config web, automatic orientation and large-image handling.

0.1.0 #

Initial release.

  • ImageCompressor.toSize(input, maxBytes:) — compress to a target file size. The quality search runs natively (decode once), so it stays fast on large images. Returns reachedTarget + usedQuality instead of throwing when a size can't be met.
  • ImageCompressor.toQuality(input, quality:) — fixed-quality mode.
  • toSizeAll / toQualityAll — batch with bounded concurrency, onProgress, and CancelToken support.
  • Any input via ImageSource — bytes, file path, asset key, or an XFile straight from image_picker.
  • CompressedImage.saveTo(path) extension (native only).
  • Automatic EXIF orientation (autoOrient), decode-time downsampling to avoid OOM on large images, and consistent per-edge resize across platforms.
  • Formats: JPEG/PNG everywhere, WebP on Android + web, HEIC on iOS.
  • Platforms: Android, iOS, Web.
  • Never returns null — hard failures throw a typed CompressError.
1
likes
0
points
331
downloads

Publisher

unverified uploader

Weekly Downloads

Compress images to a target file size in Flutter — one call to get an image under X KB. Native speed, zero-config web, automatic orientation and large-image handling.

Repository (GitHub)
View/report issues

Topics

#image #compression #image-compression #resize #thumbnail

License

unknown (license)

Dependencies

cross_file, flutter, flutter_web_plugins, meta, plugin_platform_interface, web

More

Packages that depend on image_compressor

Packages that implement image_compressor