image-webpack-loader
image-webpack-loader copied to clipboard
Wrong images encoding with 3.4.0
Safari 10.1 cannot read some embedded PNG images with the same config as for v. 3.3.1. Wrong encoding or something else.
{
test: /(^((?!-bg).)*png$|^((?!-bg).)*jpe?g$|^((?!-bg).)*gif$|^((?!-bg).)*svg$)$/i,
use: [
{
loader: 'url-loader',
options: {
hash: 'sha512',
digest: 'hex',
name: '[name].[ext]?[hash]',
limit: 250000,
},
},
{
loader: 'image-webpack-loader',
options: {
pngquant: {
quality: '65-90',
speed: 4,
optimizationLevel: 7,
interlaced: false,
},
mozjpeg: {
quality: 65,
},
},
},
],
},
All image processing libs are at the same versions as it were with image-webpack-loader v3.3.1 Only downgrading to 3.3.1 helps.
Under chrome it's ok.
I have the same issue
Same here, will now downgrade to 3.3. Only on Safari / macOs or IOS. Even with no options the images will not be ok. Other browsers no problems.
Same issue. Downgraded to 3.3.1. Fixed issue for Safari and Firefox. Otherwise, jpegs and pngs were errored images.
can you try with 3.4.1?
The issue is still present with 3.4.1. It is because the file is now a webp image instead of a png image and thus a duplicate of the various other open issues / pull requests relating to this.
$ file e4614c15661b2b934ec6ffa4c1dbcf00.png
e4614c15661b2b934ec6ffa4c1dbcf00.png: RIFF (little-endian) data, Web/P image
Other issues:
- https://github.com/tcoopman/image-webpack-loader/issues/111
- https://github.com/tcoopman/image-webpack-loader/issues/112
- https://github.com/tcoopman/image-webpack-loader/pull/114
- https://github.com/tcoopman/image-webpack-loader/pull/115
#115 will make the webp optimizer optional, as it should have been. Sorry for any inconvenience this may have caused!
Same issue. You can turn webp.enabled as false to fix this problem.
loaders: [
'image-webpack?{webp:{enabled: false}}'
]
By default, image-webpack-loader will push imageminWebp into plugins.
// index.js line 78
if(options.webp.enabled !== false)
plugins.push(imageminWebp(options.webp));
You are referring to outdated code. Please update to 3.4.2
I'm still seeing this with 3.4.2.
I take it back, 3.4.2 fixes this, but make sure you remove the previous hack (webp.enabled = false
).