Replace 7 libraries with one.
Images. Audio. Video. Browser. Node.
| Feature | omni-compress | bic | compressorjs | sharp | jimp | lamejs | heic2any |
|---|---|---|---|---|---|---|---|
| Browser | ✅ | ✅ | ✅ | ❌ | ⚠️ | ✅ | ✅ |
| Node.js | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ |
| Web Workers | ✅ auto | ✅ opt-in | ❌ | — | ❌ | ❌ | ❌ |
| Images | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Audio | ✅ | ❌ | ❌ | ❌ | ❌ | MP3 | ❌ |
| Video | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| AVIF output | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
| HEIC input | ✅ | ❌ | ❌ | ✅* | ❌ | ❌ | ✅ |
| AbortSignal | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
| Progress | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Zero-copy | ✅ | ❌ | ❌ | — | ❌ | ❌ | ❌ |
| Size guard | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
| TypeScript | ✅ | ✅ | basic | ✅ | ✅ | ❌ | basic |
| License | MIT | MIT | MIT | Apache-2 | MIT | ⚠️ LGPL | MIT |
| Maintained | ✅ | ❌ 3yr | ❌ 3yr | ✅ | ✅ | ❌ | ❌ 4yr |
bic = browser-image-compression | * sharp supports HEIC with optional plugin
npm install omni-compress