JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 150
  • Score
    100M100P100Q79926F
  • License

Gulp plugin to optimize images using imageoptim-cli

Package Exports

  • gulp-imageoptim

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-imageoptim) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Gulp-ImageOptim

Gulp plugin to optimize images using ImageOptim-CLI.

Please note this plugin uses ImageOptim-CLI. Unfortunately currently there is no support for Windows and Linux.

So why ImageOptim-CLI? My personal experience and current benchmarks suggest that ImageOptim and ImageAlpha currently outperform alternatives over lossless and lossy optimizations.

Install

NPM

Usage

var gulp = require('gulp');
var imageOptim = require('gulp-imageoptim');


gulp.task('images', function() {
    return gulp.src('src/images/**/*')
        .pipe(imageOptim.optimize())
        .pipe(gulp.dest('build/images'));
});

Methods

.optimize(options)

Optimize images using ImageOptim-CLI

Options

status

Set to false to disable optimize summary in console.

Type: Boolean Default: true

batchSize

Batch size

Type: Integer Default: 100

FAQS

Does Gulp-ImageOptim use JPEGmini?

No. JPEGmini is a paid-for product. We are using ImageOptim-CLI (ImageOptim and ImageAlpha) without JPEGmini.

Can I use this plugin on Windows and Linux?

Unfortunately, ImageOptim and ImageAlpha are not available on those platforms yet.