Skip to content

ixamp/gulp-webp-in-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Gulp plugin that adds webp to html

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published