Open mrgoonie opened 4 years ago
Hi @mrgoonie
I see in your package.json
that you have imagemin-optipng
and imagemin-pngquant
installed. I'm not sure, but this could be the reason that next-optimized-images gets confused because of that. You usually only want to use one optimization library for png images. Can you try to uninstall imagemin-pngquant
so you only have imagemin-optipng
installed (which is more commonly used) and see if that changes anything?
Thanks for the response, I tried your suggestion, but the result is still the same 😢
I'm having the same issue, installed imagemin-optipng and next-optimized-images, however, when .png image sizes remain the same as before installing and adding the plugin.
I recommend using the canary version in this case as it is a complete rewrite and image optimization was moved to WebAssembly and so it works the same in every environment. It solves all current issues and can already be considered stable, just a few features are missing before I will publish it as a non-canary version.
I am sorry that I don't have enough time to investigate this problem in the v2
version. But I want to invest most of my time in the canary version to be able to publish it as soon as possible and resolve all open issues. And it is also possible that this issue is not even caused by next-optimized-images as it uses a 3rd party webpack loader internally which calls the imagemin plugins.
I'm facing the same issue even using the canary version. JPG is optimized (e.g. 1.7 MB to 400 kB), but PNG is even bigger than the original (15.5 MB to 15.6 MB).
While JPG works fine, PNG images don't seem to be optimized.
page/index.js
next.config.js
package.json
And the image is: /images/thumb-large@2x.png
.next/static/images/thumb-large@2x-a906e213f32c5020bd4dffa9c9641d51.png
...Or am I doing something incorrectly?