webpack-contrib / image-minimizer-webpack-plugin

Webpack loader and plugin to compress images using imagemin
MIT License
236 stars 38 forks source link

Not working gif optimizer? #129

Closed quiplunar closed 4 years ago

quiplunar commented 4 years ago

Iam use such configuration:

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] }]
        ]
      }
    })
  ]
})

package.json:

{
    "imagemin-gifsicle": "^7.0.0",
    "imagemin-mozjpeg": "^9.0.0",
    "imagemin-pngquant": "^9.0.0",
    "imagemin-webpack": "^5.1.1"
}

gif image not is optimized, why?

alexander-akait commented 4 years ago

I don't know why. You don't provide original source, maybe there is nothing to compress :smile:

quiplunar commented 4 years ago

Iam sorry for waiting

https://github.com/quiplunar/example

quiplunar commented 4 years ago

I don't know why. You don't provide original source, maybe there is nothing to compress

https://github.com/quiplunar/example

cap-Bernardito commented 4 years ago

This is a imagemin problem. There is already an open issue https://github.com/imagemin/imagemin/issues/360