GithubHelp home page GithubHelp logo

mole-inc / imagemin-jpegoptim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imagemin/imagemin-jpegoptim

0.0 1.0 0.0 84 KB

Imagemin plugin for jpegoptim

License: MIT License

JavaScript 100.00%

imagemin-jpegoptim's Introduction

imagemin-jpegoptim Node CI

Imagemin plugin for jpegoptim

Downloads Version codecov

Install

$ npm install @mole-inc/imagemin-jpegoptim

See jpegoptim-bin's install section for requirements.

Usage

const imagemin = require('imagemin');
const imageminJpegoptim = require('@mole-inc/imagemin-jpegoptim');

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

	console.log('Images optimized');
})();

API

imageminJpegoptim([options])(buffer)

Returns a Promise<Buffer>.

options

Type: Object

progressive

Type: boolean
Default: false

Lossless conversion to progressive.

max

Type: number

Set maximum image quality factor. (0-100).

size

Type: number string

Try to optimize file to given size. Target size is specified either in kilo bytes (1-n) or as percentage (1%-99%).

stripAll

Type: boolean
Default: true

Strip all markers from output file.

Note: If you want to control what markers are stripped, this must be set to false.

stripCom

Type: boolean
Default: true

Strip comment markers from output file.

stripExif

Type: boolean
Default: true

Strip EXIF markers from output file.

stripIptc

Type: boolean
Default: true

Strip IPTC/Photoshop (APP13) markers from output file.

stripIcc

Type: boolean
Default: true

Strip ICC profile markers from output file.

stripXmp

Type: boolean
Default: true

Strip XMP markers markers from output file.

buffer

Type: buffer

Buffer to optimize.

License

This is a fork of imagemin/imagemin-jpegoptim.

see license file.

imagemin-jpegoptim's People

Contributors

kevva avatar shinnn avatar sindresorhus avatar aaharu avatar 1000ch avatar philipbordallo avatar romellem avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.