This is a modified version of the plugin gulp-webp-html. Here was fixed thebug that added two dots before webp to the final html file.
// Input
<img src="/images/catalogImage.jpg">
// Output
<picture>
<source srcset="/images/catalogImage.webp" type="image/webp">
<img src="/images/catalogImage.jpg">
</picture>
npm i --save-dev gulp-webp-in-html
var GulpWebpHtml2 = require('gulp-webp-in-html');
gulp.task('html',function(){
gulp.src('./assets/**/*.html')
.pipe(GulpWebpHtml2())
.pipe(gulp.dest('./public/'))
});