S
S
SP2021-04-21 17:55:25
gulp.js
SP, 2021-04-21 17:55:25

How to process images in webp format in gulp + pug?

How to convert img to webp format? I need a non-minimized html output, but if put webphtmlafter pug, then it minimizes everything, if as below, then the conversion does not work.

function html() {
    return src(path.src.html)
        .pipe(fileinclude())
        .pipe(webphtml())
        .pipe(pug({
            doctype: 'html',
            pretty: true,
        }))
        .pipe(dest(path.build.html))
        .pipe(browsersync.stream())
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question