tcoopman / image-webpack-loader

Image loader module for webpack
MIT License
2.03k stars 132 forks source link

3.4.1 doesn't fix WebP problem but makes it even worse #112

Open ksmolyanin opened 7 years ago

ksmolyanin commented 7 years ago

because it cancels workaround when adding webp: { enabled: false } to options fixes the problem. You can look into index.js form line 77 to line 81 to make sure that webp transformation is now always on.

GarveySun commented 7 years ago

we can't disable webp in 3.4.1

fearintino commented 7 years ago

I've create pull request to fix it

adrienharnay commented 7 years ago

https://github.com/tcoopman/image-webpack-loader/pull/115

gzzhiyi commented 7 years ago

use 3.4.0

CarterLi commented 7 years ago

Encountered this issue.

I don't think webp can help because you don't know if the browsers support it. The only option is that generate two images. One for the original format one for webp format, and let developer choose which to use. But it still doesn't help because there is an easy way to let developers reference them.

JustasKuizinas commented 7 years ago

My images are created as webp but I didnt specified webp option, what is going on?

loaders: [
                    'file-loader',
                    {
                        loader: 'image-webpack-loader',
                        query: {  
                            mozjpeg: {
                                progressive: false,
                                quality: 80,
                                revert: true,
                                fastcrush: true,
                                notrellis: true,
                                notrellisDC: true,
                                noovershoot: true
                            },
                            gifsicle: {
                                interlaced: false,
                            },
                            optipng: {
                                optimizationLevel: 7,
                            },
                            pngquant: {
                                quality: '75-90',
                                speed: 4,
                            }
                        }
                    }
adrienharnay commented 7 years ago

Hey. While waiting for #115, you can use 3.4.0 with the workaround. Answer has been given in previous answers

adrienharnay commented 7 years ago

Fixed with 3.4.2

markwoon commented 7 years ago

If you have the webp.enabled=false hack, make sure you remove it when upgrading to 3.4.2.

MikaAK commented 7 years ago

Hey guys using webp: {quality: 80} didn't create new versions of my files like I thought it would. Is there additional configuration I'm missing?

adrienharnay commented 7 years ago

Hey @MikaAK, following the docs of imagemin-webp, I can't see how you could configure it to create new files instead of doing the optimization in place. I would be interested if you figure out how to do it though!