Fix image pipeline

This commit is contained in:
schmelczerandras 2020-11-27 12:08:30 +01:00
parent e18b6692ad
commit a2c6e620c9
3 changed files with 4 additions and 26 deletions

View file

@ -60,14 +60,16 @@ module.exports = (env, argv) => ({
loader: 'responsive-loader',
options: {
adapter: Sharp,
name: '[contenthash]-[width].[ext]',
name: '[contenthash].[ext]',
outputPath: 'static/',
sizes: [200, 400, 800, 1200, 1600, 2000],
quality: 0.9,
format: 'webp',
progressive: true,
},
},
{
test: /\.(webm|mp4|gif)$/i,
test: /\.(webm|mp4)$/i,
use: [
{
loader: 'file-loader',
@ -76,29 +78,6 @@ module.exports = (env, argv) => ({
name: '[contenthash].[ext]',
},
},
{
loader: 'image-webpack-loader',
options: {
disable: argv.mode === 'development',
mozjpeg: {
progressive: true,
quality: 65,
},
optipng: {
enabled: true,
},
pngquant: {
quality: [0.65, 0.9],
speed: 4,
},
gifsicle: {
interlaced: false,
},
webp: {
quality: 65,
},
},
},
],
},
{