image_to_webp 1.0.0 copy "image_to_webp: ^1.0.0" to clipboard
image_to_webp: ^1.0.0 copied to clipboard

Convert PNG/JPG images to WebP using a webp.yaml config file (CLI + API).

example/main.dart

import 'dart:io';

import 'package:image_to_webp/image_to_webp.dart';

Future<void> main() async {
  // For a real project, place this file next to your project `pubspec.yaml`.
  //
  // Example `webp.yaml`:
  //
  // paths:
  //   - assets/*     # shallow
  //   - assets/**    # recursive
  // quality: 80

  final exitCode = await runImageToWebp(
    const ['--config', 'webp.yaml'],
    stdout: stdout,
    stderr: stderr,
  );

  if (exitCode != 0) {
    exit(exitCode);
  }
}
1
likes
160
points
88
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Convert PNG/JPG images to WebP using a webp.yaml config file (CLI + API).

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, package_config, path, webp, yaml

More

Packages that depend on image_to_webp