npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-imageoptim2

v1.0.10

Published

Gulp plugin to optimize images using imageoptim and jpegmini, fork from the original repo of https://github.com/allbitsnbytes/gulp-imageoptim

Downloads

9

Readme

Gulp-ImageOptim

Gulp plugin to optimize images using ImageOptim and JPEGmini.

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

jpegmini

To enable JPEGmini support, set the option to true

Type: Boolean Default: false

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?

Yes, however, please note that JPEGmini is a paid-for product. We are using ImageOptim-CLI (ImageOptim and ImageAlpha) without JPEGmini. To use JPEGmini you will need to purchase it.

Enabling JPEGmini and support for assistive devices

You may be presented with the following message the first time you run Gulp Imageoptim with the jpegmini flag set to true:

To automate JPEGmini we need to add Terminal.app (or iTerm.app etc) to the 'support for assistive devices' whitelist.

The JPEGmini OS X Apps don't include a command line API, so a real user is simulated by entering synthetic clicks and keyboard commands instead. This requires your permission and is easily set up in System Preferences as shown by these guides.

How do I enable JPEGmini in my gulp task?

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


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

Can I use this plugin on Windows and Linux?

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