Skip to content

Commit

Permalink
Compress image assets correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
NI committed Dec 12, 2021
1 parent 1541e5f commit bcfd90a
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,31 +444,11 @@ module.exports = {
implementation: ImageMinimizerPlugin.imageminMinify,
options: {
plugins: [
"imagemin-gifsicle",
"imagemin-mozjpeg",
"imagemin-pngquant",
"imagemin-svgo",
["imagemin-gifsicle", { interlaced: true, }],
["imagemin-mozjpeg", { progressive: true, }],
["imagemin-pngquant", { quality: [0.02, 0.2], }],
// ["imagemin-svgo", { plugins: ["preset-default"], }],
],
encodeOptions: {
webp: {
quality: 50,
method: 6,
lossless: false,
metadata: "none",
},
gifsicle: {
interlaced: true,
},
mozjpeg: {
progressive: true,
},
pngquant: {
quality: [0.02, 0.2],
},
svgo: {
plugins: ["preset-default"],
},
},
},
},
})
Expand Down

0 comments on commit bcfd90a

Please sign in to comment.