gulp-html-webp
v1.0.2
Published
replace <img/> to <picture/> supports webp. Add supports for class and svg
Downloads
16
Readme
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-html-webp
Usage
var webpHTML = require('gulp-html-webp');
gulp.task('html',function(){
gulp.src('./assets/**/*.html')
.pipe(webpHTML())
.pipe(gulp.dest('./public/'))
});