Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Safari could not load a PNG image in base64 format #230

Open
LLLLLamHo opened this issue Apr 10, 2020 · 1 comment
Open

Safari could not load a PNG image in base64 format #230

LLLLLamHo opened this issue Apr 10, 2020 · 1 comment

Comments

@LLLLLamHo
Copy link

  • 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?

@nam-diijam
Copy link

nam-diijam commented May 21, 2020

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: #138

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants