image-webpack-loader icon indicating copy to clipboard operation
image-webpack-loader copied to clipboard

Broken JPG

Open yepninja opened this issue 7 years ago • 30 comments

JPG images had been broken in firefox after last release

yepninja avatar Aug 31 '17 19:08 yepninja

and safari on OSX and iOS

timothyallan avatar Sep 01 '17 01:09 timothyallan

same for me

ferronrsmith avatar Sep 02 '17 21:09 ferronrsmith

Can you try the new release?

tcoopman avatar Sep 03 '17 14:09 tcoopman

I'm experiencing the same issues, even with v3.4.1

timjackleus avatar Sep 03 '17 14:09 timjackleus

@tcoopman The update didn't help

yepninja avatar Sep 03 '17 19:09 yepninja

This options value is always true https://github.com/tcoopman/image-webpack-loader/blob/master/index.js#L80. So all images are transformed to webp Also, I think that adding support for webp is wrong now because other plugins just optimize images and don't change their format, but webp plugin transforms images of other formats and doesn't optimize webp images. So it is need another logic to support webp. If this options is enabled the images should be saved with another extension after transformation

yepninja avatar Sep 03 '17 21:09 yepninja

I have tried to downgrade image-webpack-loader to version 3.3.1 temporarily to fix this problem.

achmadk avatar Sep 04 '17 02:09 achmadk

Seems the tests are also broken, because this case continues to "pass", even though it fails

ferronrsmith avatar Sep 04 '17 03:09 ferronrsmith

Same problem

fearintino avatar Sep 04 '17 14:09 fearintino

Same problem, my jpeg images are broken, it happens on 3.3.1 and 3.4.1

JustasKuizinas avatar Sep 05 '17 16:09 JustasKuizinas

PNG images are broken as well. And Safari doesn't load images too.

NandoSangenetto avatar Sep 06 '17 13:09 NandoSangenetto

We seem to be having broken JPG/PNG on Safari & Firefox but we are using 3.3.1.

Downgrading to 3.2.0 fixed it temporarily for us.

skube avatar Sep 12 '17 20:09 skube

@skube The broken jpgs/pngs are fixed in 3.4.2

@tcoopman This issue can be closed alongside with https://github.com/tcoopman/image-webpack-loader/issues/112 & https://github.com/tcoopman/image-webpack-loader/issues/109

thmsobrmlr avatar Sep 13 '17 06:09 thmsobrmlr

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

markwoon avatar Sep 17 '17 07:09 markwoon

https://github.com/webpack/webpack-dev-server/issues/1212#issuecomment-349329460 I also facing the same issue by today..

Still unable to solve using v3.4.2 only jpeg cannot load...

I didn't see any diff in webp.enabled=false/true.. same result.. possible to disable jpeg option? i tried

enabled: false in mozjpeg.. still compress my images.

Update

Using v3.4.0 solved my problem.. I saw different people using different version / downgrade to solve.. weird..

zigang93 avatar Dec 05 '17 15:12 zigang93

I'm also facing this issue in 3.4.2, tried also 3.4.0 but still no images in safari (on mac and iPhone).

NiceGuyNimni avatar Dec 19 '17 08:12 NiceGuyNimni

Tried 3.4.0 and still same issue.

Downgrading to "image-webpack-loader": "^3.2.0" did the work for me.

redpanda-bit avatar Dec 24 '17 15:12 redpanda-bit

REMEMBER in webp setting: webp: { enabled: false }

zigang93 avatar Dec 24 '17 15:12 zigang93

I had the same issue, wether I enabled webp or not. When trying to open file with irfanview it said: "the file is a WEBP file with wrong extension". I downgrade to 3.2.0 to make it work.

samIntegrateur avatar Jan 01 '18 13:01 samIntegrateur

webp is only supported by chrome right now.

glemiere avatar Apr 17 '18 00:04 glemiere

Same issue. Entirely removing the webp property from options finally fixed it. Including webp: { enabled: false } still converted our images to webp. Thanks to https://github.com/tcoopman/image-webpack-loader/issues/148#issuecomment-377632160

joemaller avatar Jun 11 '18 21:06 joemaller

Still have the bug on "version": "4.3.1", had to remove the

              webp: {
                enabled: true
              }

part of the configuration, even setting it to false didn't work.

pmioni avatar Sep 21 '18 13:09 pmioni

pimoni is correct. This only seems to be an issue on firefox....

dlhines avatar Sep 21 '18 16:09 dlhines

The files produced are encoded as webps, but with a jpg extension. Firefox cannot read them, nor can my Ubuntu file manager.

pmioni avatar Sep 21 '18 16:09 pmioni

https://caniuse.com/#search=webp

rozsival avatar Sep 25 '18 09:09 rozsival

Had the same issue where pngs were broken on safari and firefox. I just commented out my webp config and it's all good.

andrecalvo avatar Nov 30 '18 10:11 andrecalvo

Still broken with 4.5.0. This should either be documented somewhere or the default behavior should be changed so that webp needs to be explicitly enabled before it starts converting all images to webp.

joe1chen avatar Dec 18 '18 22:12 joe1chen

Can someone who has this issue create a PR for this?

tcoopman avatar Dec 19 '18 06:12 tcoopman

v4.6.0. Works in chrome and firefox. But broken in safari. Strangely, can't even open the image files in Mac's inbuilt image Preview.

Below works. Removing config for webp.

https://github.com/tcoopman/image-webpack-loader/issues/111#issuecomment-443160129 https://github.com/tcoopman/image-webpack-loader/issues/111#issuecomment-423526387

[Sorry for redundant comment but pointing out since this persists in latest version too].

aseem2625 avatar Apr 20 '19 11:04 aseem2625

现在还是不能用,没解决吗

grace618 avatar Dec 19 '19 15:12 grace618