Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load https svg error #232

Open
liuhuan0225 opened this issue Jan 25, 2025 · 2 comments
Open

load https svg error #232

liuhuan0225 opened this issue Jan 25, 2025 · 2 comments
Labels

Comments

@liuhuan0225
Copy link

liuhuan0225 commented Jan 25, 2025

url = https://asset.imee.tv/icon/country/england.svg

Image
这个if判断过不去
并没有判断

Image

下面这个是 coil3的 可以加载

Image

@panpf
Copy link
Owner

panpf commented Feb 7, 2025

Image
因为这一行导致的,要么删掉它,要么你先自定义一个 Factory 判断 fetchResult.mimeType

之所以没有像coil 那样使用 mimeType 判断是因为 mimeType 是通过 url 后缀名解析得来的,之前出现过有些图片的后缀名是错误的(后缀名是 gif,实际是 jpeg,导致解码失败),所以统一改为判断文件内容,这样可以识别伪装后缀名的文件。

d07d5cb

这个问题目前没有好的统一的办法,你先自己兼容一下吧

@panpf
Copy link
Owner

panpf commented Feb 7, 2025

下个版本会增加检测 mimeType

panpf added a commit that referenced this issue Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants