1.0.0 • Published 2 years ago

gulp-webp-html-nosvg-lv v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

gulp-webp-in-html-lite-version

This is a modified version of the plugin gulp-webp-html & gulp-webp-html-nosvg. Here was fixed thebug that added two dots before webp to the final html file. No SVG format.

Example

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

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

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

// Output
<img src="/images/catalogImage.svg" />

Install

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

Usage

let webphtml = require("gulp-webp-html-nosvg-lv");

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