Web Worker image compression
compresso.js/pool exposes createPool() and compressMany() — parallel jobs off the main thread with crash/timeout recovery. Falls back silently where Workers are blocked.
Comment ça marche
- import { createPool } from "compresso.js/pool"
- const pool = createPool()
- await pool.compressMany(files, options)
Questions courantes
- CSP requirements?
- Needs worker-src self; HEIC needs wasm-unsafe-eval in script-src.
Pour les développeurs
Intégrez la compression dans votre flux d’envoi :
npm install compresso.jsnpm · Docs