Klathmon / imagemin-webpack-plugin

Plugin to compress images with imagemin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Images don't compress

ddubrava opened this issue · comments

Hello, may u help me please to fix a problem so that the img do not compress. I took a code from an example. Images are copying in dist but they are not compressing. I tried different extensions but it doesn't still work.
Thank you!
https://github.com/Webblook/Webpack-light

Your only image in that repo seems to be a ~700 byte SVG image which looks like it's already been optimized as much as it realistically can be.

If this plugin notices that the image was the same or larger than the one it started with, it will just use the original image.

Also, you aren't including the image in your webpack build.

In order for this plugin to even see the image exists, it must be require'd or include'd in a javascript source file. You just have it linked in the HTML, so webpack doesn't even see it.

If you want to optimize the image without using require or include, then you need to use the externalImages option in this plugin to manually specify the images.