Answer the question
In order to leave comments, you need to log in
Why is gulp-webp-html not working?
For some reason, the gulp-webp-html plugin doesn't want to work.
There is html code:
<section class="map">
<h2 class="visually-hidden">Схема проезда</h2>
<figure class="map__wrapper">
<div class="map__interactive" id="map-interactive">
<p>Нажмите, чтобы включить интерактивную карту</p>
</div>
<picture>
<source media="(min-width: 960px)" srcset="img/map.png">
<source media="(min-width: 660px)" srcset="img/map-tablet.png">
<img src="img/map-mobile.png" alt="Схема проезда в наш офис" class="map__image">
</picture>
</figure>
</section>
const webpHTML = require("gulp-webp-html");
function html() {
return src(path.src.html)
.pipe(fileInclude())
.pipe(webpHTML())
.pipe(dest(path.build.html))
.pipe(server.stream());
}
exports.html = html;
Answer the question
In order to leave comments, you need to log in
In the dock, they initially connect just a picture with just an img tag. And the galp itself wraps it in a picture. Well, according to the doc https://www.npmjs.com/package/gulp-webp-html . I would also include gulp-webp to convert images to the desired format
Need more information.
Action script, preferably all gulpfile code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question