image_compression_flutter
1.0.4, released 3 years ago by alan.my.id
Flutter image compression and resizing for Mobile, Desktop, and Web.
WASM-ready
What it does
Provides a unified API for compressing and resizing JPG, PNG, and WEBP images across mobile, desktop, and web platforms. It combines native mobile compression with cross-platform desktop and web packages under the hood.
AI-written summary of version 1.0.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to compress or resize images before uploading them on mobile, desktop, or web.
- You want a single cross-platform API that handles different underlying compressors per platform.
Skip it when
- You only need basic image rendering or caching.
- You need complex image editing operations beyond compression and resizing.
Strengths
- Cross-platform support including mobile, desktop, and web.
- Supports JPG, PNG, and WEBP formats.
- Accepts XFile as input image.
Weaknesses
- License is unknown.
- Relies on different underlying packages per platform (native vs cross-platform).
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
not documented
ImageFile input;
Configuration config = Configuration(
outputType: ImageOutputType.webpThenJpg,
useJpgPngNativeCompressor: false,
quality: 40,
);
final param = ImageFileConfiguration(input: input, config: config);
final output = await compressor.compress(param);Alternatives
Packages that do the same job and could replace image_compression_flutter.
Works with
Packages commonly used together with image_compression_flutter: ones it builds on, ones built on it, and its own family.
- flutter_image_compressimage_compression_flutter depends on itCompress pictures using native code to effectively reduce image size.
- cross_fileimage_compression_flutter depends on itAn abstraction to allow working with files across multiple platforms.
- image_compressionimage_compression_flutter depends on itA Dart extension for the image package to compress and resize images.