imagemin / imagemin-webp

WebP plugin for imagemin
MIT License
494 stars 45 forks source link

not converting images to webp on macbook air 13 #46

Open shahriyor-sharifjonov opened 1 year ago

shahriyor-sharifjonov commented 1 year ago

i have gulp project that worked on windows 10. now i'm using macbook and gulp-webp not converting images to webp. any solutions?

source code: https://github.com/shahriyor-sharifjonov/gulp-2023

image code:

import webp from "gulp-webp"
import imagemin from "gulp-imagemin";

export const images = () => { 
    return app.gulp.src(app.path.src.images)
        .pipe(app.plugins.plumber(
            app.plugins.notify.onError({
                title: "IMAGES",
                message: "Error: <%= error.message %>"
            })
        ))
        .pipe(app.plugins.newer(app.path.build.images))
        .pipe(webp())
        .pipe(app.gulp.dest(app.path.build.images))
        .pipe(app.gulp.src(app.path.src.images))
        .pipe(app.plugins.newer(app.path.build.images))
        .pipe(imagemin({
            progressive: true,
            svgoPlugins: [{ removeViewBox: false }],
            interlaced: true,
            optimizationLevel: 3 // 0 to 7
        }))
        .pipe(app.gulp.dest(app.path.build.images))
        .pipe(app.plugins.browsersync.stream());
}