img-compress-tool
v1.0.5
Published
a plugin for iamge compress
Downloads
2
Readme
img-compress
A simple JS image compression tool
一个简单的图片js图片压缩工具
Install
npm install img-compress-tool
Usage
import ImgCompress from 'img-compress-tool'
new ImgCompress(file, quality, size, width).initCompress(function (data) {
let file = data.file // 压缩后的图片文件
let baseUrl = data.baseUrl // 压缩后图片base64 url
})