Skip to content

Releases: 2YH02/img-toolkit

v2.1.1

07 Feb 17:04

Choose a tag to compare

Patch Release

Fixed

  • Added repository, homepage, and bugs metadata in package.json to satisfy npm provenance validation during publish.

Chore

  • Bumped version to 2.1.1 and updated changelog.

No runtime/API behavior changes from v2.1.0.

v2.1.0

07 Feb 16:40
cccb755

Choose a tag to compare

What's New

This release improves API clarity, Worker stability, WebP handling, and release reliability.

API updates

  • Added modular APIs:
    • processImage(file, options)
    • resize(file, options)
    • convertFormat(file, options)
    • adjustBrightness(file, options)
  • Kept legacy resizeImage(file, options) for 2.x compatibility (deprecated path).

WebP behavior

  • Added graceful fallback for environments without browser lossy WebP APIs:
    • If lossy browser APIs are unavailable, processing falls back to wasm WebP (lossless) instead of hard-failing.
  • Added one-time warning for lossy fallback cases.

Error handling hardening

  • User-facing errors are now generic.
  • Detailed internal/environment-specific errors are logged internally instead of exposed directly.

CI/CD reliability

  • Release workflow now includes required wasm setup steps (wasm-pack, wasm target) before build.

Docs

  • Added quality comparison section in README.
  • Added comparison assets under docs/assets/quality.

Notes

  • quality is effective for JPEG and browser-lossy WebP paths.
  • In fallback wasm WebP (lossless) mode, quality may be ignored by design.