Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-image-optimization with all npm packages installed. Try it out:

var gulpImageOptimization = require("gulp-image-optimization")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-image-optimization v0.1.3

Minify PNG, JPEG and GIF images. this is based on https://github.com/sindresorhus/gulp-imagemin with stream-limit implementation

gulp-image-optimization

Minify PNG, JPEG and GIF images with image-min

Issues with the output should be reported on the image-min issue tracker.

Install

Install with npm

npm install --save-dev gulp-image-optimization

Example

var gulp = require('gulp');
var imageop = require('gulp-image-optimization');

gulp.task('images', function(cb) {
    gulp.src(['src/**/*.png','src/**/*.jpg','src/**/*.gif','src/**/*.jpeg']).pipe(imageop({
        optimizationLevel: 5,
        progressive: true,
        interlaced: true
    })).pipe(gulp.dest('public/images')).on('end', cb).on('error', cb);
});

API

imageop(options)

See the image-min options.

License

MIT © [Mohamed Rachidi]

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free