[go: up one dir, main page]

imagemin-jpegtran
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/imagemin-jpegtran package

8.0.0 • Public • Published

imagemin-jpegtran

jpegtran imagemin plugin

Install

$ npm install --save imagemin-jpegtran

Usage

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

(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

Type: object

progressive

Type: boolean
Default: false

Lossless conversion to progressive.

arithmetic

Type: boolean
Default: false

Use arithmetic coding.

buffer

Type: buffer

Buffer to optimize.

Package Sidebar

Install

npm i imagemin-jpegtran

Weekly Downloads

246,727

Version

8.0.0

License

MIT

Unpacked Size

4.07 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus