jpegtran imagemin plugin
$ npm install --save imagemin-jpegtran
const imagemin = require('imagemin');
const imageminJpegtran = require('imagemin-jpegtran');
imagemin(['images/*.jpg'], 'build/images', {use: [imageminJpegtran()]}).then(() => {
console.log('Images optimized');
});
Returns a promise for a buffer.
Type: boolean
Default: false
Lossless conversion to progressive.
Type: boolean
Default: false
Use arithmetic coding.
Type: buffer
Buffer to optimize.
MIT © imagemin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.