- fixed: image with large size may result in an a 0 byte broken image #198
- fixed: skip copy Exif metadata when fails #187
- fixed: raise error if image file is corrupted / cannot be loaded #194
- fixed: BMP output size may increase in some situations #195
- fixed: node version restriction #185
- feature: preserve Exif metadata for JPEG #164
- feature: support BMP image compression #181
- optimized: solved error in sensible CSP environment #106
- optimized: increase initial PNG color depth to improve output quality #180
- fixed: circular dependency #34
- fixed: export Options interface #157
- fixed: black image output on iOS devices #169, #165, #166
- feature: example html - added CSS animation for showing main thread status
- feature: example html - added version switch
- feature: support AbortController (abort / cancel during compression) #101
- feature: options.alwaysKeepResolution (default: false) - keep the resolution (width and height) during compression and reduce the quality only (note that options.maxWidthOrHeight is still applied if set) #127
- fixed: Main thread is blocked on Mac device for options.useWebWorker=true #139
- updated: dropped core-js to reduce bundle size #138
- updated: options.useWebWorker default set to true
- feature: apply white background to transparent PNG > JPG conversion if options.fileType is image/jpeg or image/jpg #119
- fixed: Fixed image cropped on Safari #118
- fixed: Fixed output white picture on iOS Safari for large image because of canvas max size #116
- fixed: Fixed wrong image orientation on iOS device #118
- feature: set white background for transparent png file with jpeg file extension #119
- fixed: Fixed black Images and type error by considering Canvas maximum size supported by different browsers #84, #36
- fixed: IE compatibility, include polyfill with core-js@3 e.g, globalThis, Promise #108, #110
- fixed: Test suites in few projects may have error, added extra checking on whether File and FileReader exist in the Window object #92
- fixed: issue with export causing compile error in typescript project #63
- updated: use UZIP to compress PNG image instead of Canvas
- fixed: PNG transparent background become black after compression #84, #76
- fixed: progress jump back to 0 when Web Worker failback to main thread #90
- added: new option for setting initial quality level #64, #78
- fixed: options object being altered by the compress func #71
- fixed: issue with output size of png compression #57
- fixed: issue with SSR #58
- fixed: issue in Web Worker when onProgress is undefined #50
- fixed: handle behavior change of exif orientation in iOS 13.4.1 and Safari 13.1 Desktop #52
- updated: typescript type definitions to resolve #54
- updated: compression becomes less aggressive, output file is closer to the 'maxWidthOrHeight' and/or 'maxSizeMB' in config
- fixed: file size increased in specific situation
- added: support for Server Side Rendering (SSR)
- updated: ts type file
- added: onProgress function in options for compression progress updates
- added: allow fileType override
- added: ts type file
- updated: useWebWorker default set to false
- fixed: garbage clean canvas for safari
- fixed: issue in Cordova support
- fixed: issue in IE browser
- fixed: other issues
- fixed: exif orientation do not work in some situations
- added: support for cordova project that uses cordova-plugin-file
- optimized: follow image exif orientation even though image do not required to compress or resize
- fixed: error may throw on iPhone Safari because of OffscreenCanvas cannot get 2d context
- fixed: exif orientation do not work in some situations
- fixed: bug related to image orientation and squeezing
- fixed: bug related to wrong image output resolution in some cases
- breaking change: change "imageCompression" function signature
- optimized: use of OffscreenCanvas when support, fallback to document.createElement('canvas')
- optimized: use createImageBitmap when support, fallback to FileReader readAsDataURL
- added: support web worker
- added: follows image exif orientation