Closed gethubHanSo closed 2 years ago
实际压缩png 图片后 图片大小无变化
实际上是:图片大小变大了,回退到原始图片。请查看 strict 参数的说明:https://github.com/fengyuanchen/compressorjs#strict。
strict
遇到同样的问题, 压缩png 图片 无效果
由于依赖浏览器原生API进行压缩,确实不支持压缩 PNG 图片,不过可自动转为 JPEG 图片,请参考 convertSize 参数。
实际压缩png 图片后 图片大小无变化