imagemin-jpegtran-gfw
v0.2.0
Published
jpegtran imagemin plugin for gfw
Downloads
1
Maintainers
Readme
imagemin-jpegtran-gfw
jpegtran imagemin plugin
Install
$ npm install --save imagemin-jpegtran-gfw
Usage
var Imagemin = require('imagemin');
var jpegtran = require('imagemin-jpegtran-gfw');
var imagemin = new Imagemin()
.src('images/*.jpg')
.dest('build/images')
.use(jpegtran({ progressive: true }));
imagemin.run(function (err, files) {
if (err) {
throw err;
}
console.log('Files optimized successfully!');
});
You can also use this plugin with gulp:
var gulp = require('gulp');
var jpegtran = require('imagemin-jpegtran-gfw');
gulp.task('default', function () {
return gulp.src('images/*.jpg')
.pipe(jpegtran({ progressive: true })())
.pipe(gulp.dest('build/images'));
});
Options
progressive
Type: Boolean
Default: false
Lossless conversion to progressive.
License
MIT © anhulife