imagemin-jpegtran

jpegtran imagemin plugin

MIT 18 个版本
安装
npm install imagemin-jpegtran
yarn add imagemin-jpegtran
pnpm add imagemin-jpegtran
bun add imagemin-jpegtran
README

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.

版本列表
8.0.0 2024-09-25
7.0.0 2020-05-29
6.0.0 2018-11-02
5.0.2 2016-05-26
5.0.1 2016-05-18
5.0.0 2016-04-29
4.3.2 2015-11-13
4.3.1 2015-10-10
4.3.0 2015-07-04
4.2.0 2015-06-06
4.1.0 2015-02-02
4.0.0 2014-10-24
3.1.1 2014-10-21
3.1.0 2014-10-21
3.0.0 2014-10-20
2.0.0 2014-09-10
1.0.0 2014-08-18
0.1.0 2014-04-23