All notable changes to Compressor.js Next are documented in this file, which is (mostly) AI-generated and (always) human-edited. Dependency updates may or may not be called out specifically.
The format is based on Keep a Changelog, and the project adheres to Semantic Versioning.
- Updated compressed result to be returned as a
Fileobject rather than a plainBlob, soinstanceof Filechecks pass without manual conversion (fengyuanchen/compressorjs#146)
- Ensured EXIF data is consistently stripped across all browsers when
retainExifis false—WebKit’s canvas previously preserved the source EXIF in JPEG output
- Expanded browser test matrix to include Firefox and WebKit (in addition to Chromium)
- Removed
checkOrientationoption—all modern browsers now apply EXIF orientation natively viaimage-orientation: from-image(including incanvas.drawImage()), making manual correction redundant
- Added
typescondition toexportsfield so TypeScript finds type declarations with modernmoduleResolutionsettings (#21)
- Added detection for unreliable canvas (e.g., Firefox
privacy.resistFingerprinting), falling back to returning the original image with EXIF stripped, instead of silently corrupted output (fengyuanchen/compressorjs#177)
- Added warning when canvas is unreliable or produces no output
- Removed deprecated
lastModifiedDateproperty from output (uselastModifiedinstead)
- Explicit
mimeTypeoption is no longer overridden byconvertTypes/convertSizeauto-conversion
- BREAKING: Changed
convertTypesdefault from['image/png']to[]to preserve PNG transparency by default (fengyuanchen/compressorjs#184) [not made major release due to package being so new]
- Tightened package documentation
- Simplified demo
- Added makeshift development server option
- Fixed blob URL memory leak in error and abort paths
- Fixed deprecated
substr()usage
- BREAKING: Adopted Compressor.js as Compressor.js Next
- BREAKING: Made ESM the default module format via
exportsfield (CommonJS still supported) - BREAKING: Removed
noConflict()method - BREAKING: Dropped Internet Explorer support
- Updated all dependencies
- Migrated from Karma/Mocha/Chai to Vitest with browser mode for cleaner ESM-native testing
- Updated
.browserslistrcto target only modern browsers, reducing transpilation overhead - Added
"type": "module"for native ESM support - Added
"sideEffects": falsefor better tree-shaking support - Converted all test files to
async/awaitpattern - Added unit tests for utility functions
- Added tests for blob URL cleanup verification
- Updated TypeScript declarations
- Replaced
uglify-jswithterser - Migrated to ESLint flat config
- Reviewed and revised entire project
- Refactored binary handling functions (
getExif,insertExif,arrayBufferToDataURL) to useDataViewinstead ofArray.from()for significantly better memory efficiency on large images
- Removed unused dependencies
- Removed
blueimp-canvas-to-blobdependency (canvas.toBlob()now universally supported) - Removed
is-blobdependency (use nativeinstanceof Blob) - Removed Karma/Mocha/Chai testing stack
- Removed issue report templates and requirements