JavaScript image compressor for the browser
compresso.js is a 3.6 KB, zero-dependency library that compresses, resizes, and converts images using the Canvas API — with optional HEIC input and parallel Web Worker batching.
使用方法
- npm install compresso.js
- import { compress } from "compresso.js"
- await compress(file, options)
常见问题
- TypeScript?
- First-class types ship with the package.