You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't convert images to webp, error messages appears
"ERROR in outputName is not defined"
"ERROR in ImageminWebpWebpackPlugin: "images/hero/hero.png" wasn't converted!"
Please help!
Can't convert images to webp, error messages appears
"ERROR in outputName is not defined"
"ERROR in ImageminWebpWebpackPlugin: "images/hero/hero.png" wasn't converted!"
here's my webpack.mix.js
`let mix = require('laravel-mix');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const CopyWebpackPlugin = require('copy-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const ImageminWebpWebpackPlugin = require("imagemin-webp-webpack-plugin");
mix.setPublicPath('public_html/');
// Images
mix.webpackConfig({
plugins: [
//Compress images
new CopyWebpackPlugin([{
from: '**/*', // FROM
to: 'images/', // TO
context: "resources/assets/images/",
}]),
new ImageminPlugin({
test: /.(jpe?g|png|gif|svg)$/i,
pngquant: {
quality: '70-80'
},
plugins: [
imageminMozjpeg({
quality: 85,
//Set the maximum memory to use in kbytes
maxmemory: 1000 * 512
})
]
}),
new ImageminWebpWebpackPlugin({
config: [{
test: /.(jpe?g|png)/,
options: {
quality: 75
}
}],
overrideExtension: true,
detailedLogs: true,
silent: false,
strict: true
})
],
});`
The text was updated successfully, but these errors were encountered: