- Publish to NPM with a new name:
image-compressor.js.
- Improve the conditions for returning original file when the result size greater then original one.
- Improve browser compatibility for orientation checking.
- Fix rotation error when the orientation value is 8 (rotated -90 degrees).
- Add new option
checkOrientationfor rotating or flipping an image with its Exif Orientation information (#10). - BREAKING CHANGE: Publish to NPM with scoped name (
@xkeshi/image-compressor).
- Add 4 new options:
maxWidth,maxHeight,minWidthandminHeight. - Override the default fill color (#000, black) with #fff (white) if the output image is JPEG.
- Convert the output file name's extension to match its type.
- Add 2 new options:
mimeTypeandconvertSize(#2). - If the result is greater than original one, but the
widthorheightoptions is also set, then not to return original one (#2). - Return original image file if the result is null in some cases.
- Add last modified date to output File object.
- Return original image file if the result is greater than it.
- Support to compress image
FileorBlobobject. - Support 5 options:
width,height,quality,successanderror.