gulp-webp
Version:
Convert images to WebP
33 lines (21 loc) • 523 B
Markdown
> Convert images to [WebP](https://developers.google.com/speed/webp/)
Supports PNG, JPEG, TIFF, WebP.
```sh
npm install --save-dev gulp-webp
```
```js
import gulp from 'gulp';
import webp from 'gulp-webp';
export default () => (
gulp.src('src/image.jpg')
.pipe(webp())
.pipe(gulp.dest('dist'))
);
```
See the `imagemin-webp` [options](https://github.com/imagemin/imagemin-webp#imageminwebpoptions).
Unsupported files are ignored and passed through.