Releases: 2YH02/img-toolkit
Releases · 2YH02/img-toolkit
v2.1.1
v2.1.0
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
qualityis effective for JPEG and browser-lossy WebP paths.- In fallback wasm WebP (lossless) mode,
qualitymay be ignored by design.