1.0.1 • Published 4 years ago

gulp-webp-in-html v1.0.1

Weekly downloads
22
License
MIT
Repository
github
Last release
4 years ago

gulp-webp-in-html

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.

Example

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

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

Install

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

Usage

var GulpWebpHtml2 = require('gulp-webp-in-html');

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