I am trying to convert my jpeg
images to the webp
format using the image-webpack-loader plugin in Webpack Encore. The following config successfully minifies my files but does not convert them to webp
images.
webpack.config.js
test: /\.(gif|png|jpe?g|svg)$/i,
loader: 'image-webpack-loader',
options: {
disable: true, //bypassOnDebug
convertPathData: false,
mozjpeg: { //works
progressive: true,
quality: '80-90'
},
webp: { //doesn't convert my images to webp
quality: 75,
enabled: true
}
}
How can I achieve what I want using the plugin image-webpack-loader
? Or is there another plugin I should use alongside this one?