Package Exports
- imagemin-jpegtran
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (imagemin-jpegtran) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
imagemin-jpegtran

jpegtran imagemin plugin
Install
$ npm install --save imagemin-jpegtran
Usage
var Imagemin = require('imagemin');
var jpegtran = require('imagemin-jpegtran');
var imagemin = new Imagemin()
.src('images/*.jpg')
.dest('build/images')
.use(jpegtran());
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');
gulp.task('default', function () {
return gulp.src('images/*.jpg')
.pipe(jpegtran())
.pipe(gulp.dest('build/images'));
});
Options
progressive
Type: Boolean
Default: false
Lossless conversion to progressive.
License
MIT © imagemin