Skip to content

ChangbaFE/imagemin-jpegtran

 
 

Repository files navigation

imagemin-jpegtran-changba Build Status

jpegtran imagemin plugin

Install

$ npm install --save imagemin-jpegtran-changba

Usage

const imagemin = require('imagemin');
const imageminJpegtran = require('imagemin-jpegtran-changba');

(async () => {
  await imagemin(['images/*.jpg'], {
    destination: 'build/images',
    plugins: [
      imageminJpegtran()
    ]
  });

  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

About

jpegtran plugin for imagemin

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%