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