Skip to content

Добавляет поддержку webp в HTML. Заменяет <img/> на <picture/>

Notifications You must be signed in to change notification settings

nicothin/gulp-webp-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-webp-html

Example

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

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

Install

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

Usage

var webpHTML = require('gulp-webp-html');

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

About

Добавляет поддержку webp в HTML. Заменяет <img/> на <picture/>

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published