Answer the question
In order to leave comments, you need to log in
Why doesn't imagemin-webpack optimize gif?
const merge = require('webpack-merge')
const dev = require('./webpack.dev.config.js')
const ImageminPlugin = require('imagemin-webpack')
module.exports = merge(dev, {
devtool: 'none',
plugins: [
new ImageminPlugin({
name: '[path][name].[ext]',
imageminOptions: {
plugins: [
['gifsicle', { interlaced: true, optimizationLevel: 3 }],
['mozjpeg', { quality: 73, progressive: true }],
['pngquant', { quality: [0.6, 0.8] }]
]
}
})
]
})
"imagemin-gifsicle": "^7.0.0",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.0",
"imagemin-svgo": "^8.0.0",
"imagemin-webpack": "^5.1.1"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question