gulp-webp-in-html

1.0.1 • Public • Published

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/'))
});

Dependents (0)

Package Sidebar

Install

npm i gulp-webp-in-html

Weekly Downloads

23

Version

1.0.1

License

MIT

Unpacked Size

4.58 kB

Total Files

4

Last publish

Collaborators

  • ixamp