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

Safari could not load a PNG image in base64 format

Open LLLLLamHo opened this issue 4 years ago • 1 comments

  • webpack version:4.42.1
  • url-loader version: 3.0.0
  • image-webpack-loader version: 6.0.0

This is my configuration:

{
        mozjpeg: {
            progressive: true,
            quality: 75
        },
        optipng: {
            enabled: false,
        },
        pngquant: {
            quality: [0.7, 0.90],
            speed: 4
        },
        gifsicle: {
            interlaced: false,
        },
        webp: {
            quality: 75
        },
        svgo: {
            plugins: [
                {
                    removeViewBox: false,
                },
                {
                    removeEmptyAttrs: false,
                },
            ],
        }
    }

describe

After my PNG resource is processed by image-webpack-loader, base64 or url is converted by url-loader or loaded by url. However, when the image processed by image-webpack-loader is converted into base64 by url-loader, it cannot be loaded in Safari browser. How should I deal with it?

LLLLLamHo avatar Apr 10 '20 03:04 LLLLLamHo

Try removing webp option. It took me half a day figuring out that the webp option cause this images-parsing issue on Safari (in my case it was Safari for iOS).

This issue might be related to yours: https://github.com/tcoopman/image-webpack-loader/issues/138

nam-diijam avatar May 21 '20 03:05 nam-diijam