# fengyuanchen/compressorjs

JavaScript image compressor.

Repository: https://github.com/fengyuanchen/compressorjs
Canonical: https://ross.abutalabs.com/products/compressorjs
Homepage: https://fengyuanchen.github.io/compressorjs/
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, image-compression, image-compressor, file-upload
Last push: 2026-08-23T09:42:34+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 46, longevity 100
- inputs: {"age_days": 3326, "days_push": 10, "days_rel": 149, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5764, forks 454 (observed 2026-08-28T04:09:29.355955+00:00)

## What it is
Compressor.js is a JavaScript library that compresses images in the browser using the native HTMLCanvasElement.toBlob() method. It is typically used to precompress images on the client side before uploading them to a server.

## Use cases
- compress images in the browser before upload
- reduce image file size on the client side
- resize images before uploading to a server
- compress user-uploaded photos in a web form
- convert image mime type during compression
- retain EXIF metadata while compressing images

## When to choose
- you need client-side image compression before upload to save bandwidth
- you want a small, dependency-free browser library with simple options
- you need resizing, quality control, or mime type conversion for images in the browser

## When to avoid
- you need lossless image compression
- you need consistent compression results across all browsers
- you need server-side or Node.js image compression

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, file-upload
- domain: image-processing, frontend, web-development
- platform: browser
- tags: image-compression, canvas, client-side, lossy-compression, exif, javascript

## Member repositories
- fengyuanchen/compressorjs (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:29.355955+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:56.048408+00:00, confidence not recorded.
  - readme: https://github.com/fengyuanchen/compressorjs (fetched 2026-08-28T04:09:29.355955+00:00, sha 533b2cc97fb2)
  - homepage: https://fengyuanchen.github.io/compressorjs/ (fetched 2026-08-29T08:48:36.394278+00:00, sha e96ab53000cd)
  - registry_npm: https://registry.npmjs.org/compressorjs (fetched 2026-08-29T08:48:36.396912+00:00, sha 34b935b17dab)
- Data as of 2026-08-30T08:39:29.467469+00:00.
