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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    15
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    15
  • 1.0.0
    0

Package Sidebar

Install

npm i gulp-webp-in-html

Weekly Downloads

15

Version

1.0.1

License

MIT

Unpacked Size

4.58 kB

Total Files

4

Last publish

Collaborators

  • ixamp