Skip to content
pubscout

simple_native_image_compress

3.0.2, released a year ago by hyunwookim.net

Native image compression library supporting Windows, Linux, Android, iOS, and macOS.

WASM-ready
$ flutter pub add simple_native_image_compress
Source repository

What it does

Resizes and compresses image files from a given path into AVIF, Jpeg, or WebP format as a Uint8List. It supports custom sampling filters, quality settings, and preserves image orientation.

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

Use it when

  • You need image compression on Windows and Linux desktops
  • You want native performance for image resizing and format conversion

Skip it when

  • You need Web support with WASM
  • You want to avoid native toolchain dependencies like Rust and Android NDK

Strengths

  • Supports desktop platforms (Windows, Linux, macOS) in addition to mobile
  • Provides multiple sampling filters and compression formats (Jpeg, WebP, AVIF)
  • Keeps image orientation when converted

Weaknesses

  • Requires Rust and Android NDK setup
  • Does not support Web with WASM

Setup

Kind
Plugin (native code)
Effort
High
Code generation
No
Direct dependencies
2

Requires installing Rust, cargo tools, and Android NDK for Android targets.

Future<void> main() async {
  await NativeImageCompress.init();
  runApp(const MaterialApp(home: MyApp()));
}

final bytes = await ImageCompress.containFromFilepath(
  filePath: yourFilePath,
  compressFormat: CompressFormat.avif,
  speed: 3,
  quality: 90,
  maxWidth: 512,
  maxHeight: 512,
  samplingFilter: FilterType.Lanczos3
);

Alternatives

Packages that do the same job and could replace simple_native_image_compress.

Works with

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