Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 486 Bytes

README.md

File metadata and controls

27 lines (24 loc) · 486 Bytes

gulp-webp-html

Example

// Input
<img src="/img/tmp/catalogImage.jpg">

// Output
<picture>
    <source srcset="/img/tmp/catalogImage.webp" type="image/webp">
    <img src="/img/tmp/catalogImage.jpg">
</picture>

Install

npm i --save-dev gulp-webp-html

Usage

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

gulp.task('html',function(){
    gulp.src('./assets/**/*.html')
        .pipe(webpHTML())
        .pipe(gulp.dest('./public/'))
});