gulp-webp

Convert images to WebP

npm install gulp-webp
1 downloads in the last day
1 downloads in the last week
17 downloads in the last month

gulp-webp Build Status

Convert images to WebP

Prerequisites

Requires imagemagick to be installed and in your PATH.

  • OS X: brew install imagemagick --with-webp

You can check whether your imagemagick install supports WebP by running: identify -list format | grep webp

Install

Install with npm

npm install --save-dev gulp-webp

Example

var gulp = require('gulp');
var webp = require('gulp-webp');

gulp.task('default', function () {
    gulp.src('src/image.jpg')
        .pipe(webp())
        .pipe(gulp.dest('dist'));
});

API

webp(options)

options

quality

Type: Number
Default: 100
Min: 0
Max: 100

lossless

Type: Boolean
Default: false

License

MIT © Sindre Sorhus

npm loves you