mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-23 02:08:30 +00:00
Bumps jsdom 26 → 29 across all packages' devDependencies, EXCEPT @uppy/aws-s3 (left at 26 — that plugin is being rewritten and its deps are handled separately on the rewrite branch). jsdom 29 changed its XMLHttpRequest internals so that nock — which patches Node's http module — can no longer intercept XHR upload requests in the jsdom-env unit tests, causing timeouts / spurious network errors. Fixed by migrating @uppy/xhr-upload's unit tests from nock to MSW (msw/node setupServer), which intercepts at the XMLHttpRequest layer and works across jsdom versions. nock is dropped from @uppy/xhr-upload's devDependencies. Verified: full test suite 23/23 green, typecheck 83/83, biome clean. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| src | ||
| .npmignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| turbo.json | ||
@uppy/compressor
The Compressor plugin for Uppy optimizes images (JPEG, PNG, WEBP), saving on average up to 60% in size (roughly 18 MB for 10 images). It uses Compressor.js.
Uppy is being developed by the folks at Transloadit, a versatile file encoding service.
Example
import Uppy from '@uppy/core'
import Compressor from '@uppy/compressor'
const uppy = new Uppy()
uppy.use(Compressor)
Installation
npm install @uppy/compressor
We recommend installing from yarn or npm, and then using a module bundler such as Parcel, Vite or Webpack.
Alternatively, you can also use this plugin in a pre-built bundle from
Transloadit’s CDN: Smart CDN. In that case Uppy will attach itself to the
global window.Uppy object. See the
main Uppy documentation for instructions.
Documentation
Documentation for this plugin can be found on the Uppy website.