china-imagemin-jpegtran
v5.0.3
Published
jpegtran imagemin plugin, 同步官方代码,解决国内下载jpegtran-bin,optipng-bin依赖的源码慢的问题
Downloads
15
Maintainers
Readme
imagemin-jpegtran
jpegtran imagemin plugin
Install
$ npm install --save imagemin-jpegtran
Usage
const imagemin = require('imagemin');
const imageminJpegtran = require('imagemin-jpegtran');
imagemin(['images/*.jpg'], 'build/images', {use: [imageminJpegtran()]}).then(() => {
console.log('Images optimized');
});
API
imageminJpegtran([options])(buffer)
Returns a promise for a buffer.
options
progressive
Type: boolean
Default: false
Lossless conversion to progressive.
arithmetic
Type: boolean
Default: false
Use arithmetic coding.
buffer
Type: buffer
Buffer to optimize.
License
MIT © imagemin