Some favicons cannot be loaded / saved.
💡 Summary
Some favicons cannot be loaded / saved.
🥰 Expected Behavior
Favicons should be saved and displayed.
🤬 Actual Behavior

📝 Steps to Reproduce
Logfile:
INFO * [download] Downloading https://chaos.social/packs/media/icons/android-chrome-36x36-4c61fdb42936428af85afdbf8c6a45a8.png to /tmp/tmp-1319-3XHancQuPy53 ...
DONE * [download] Download finished: https://chaos.social/packs/media/icons/android-chrome-36x36-4c61fdb42936428af85afdbf8c6a45a8.png
ERR * [server] StatusError: Unexpected mime
INFO * [download] Downloading https://chaos.social/packs/media/icons/favicon-48x48-c1197e9664ee6476d2715a1c4293bf61.png to /tmp/tmp-1319-GShuvPKd9p70 ...
DONE * [download] Download finished: https://chaos.social/packs/media/icons/favicon-48x48-c1197e9664ee6476d2715a1c4293bf61.png
ERR * [server] StatusError: Unexpected mime
INFO * [metadata] Fetching metadata of chaos.social ...
INFO * [metadata] Fetching nodeinfo of chaos.social ...
INFO * [metadata] Fetching HTML of chaos.social ...
DONE * [metadata] Successfuly fetched nodeinfo of chaos.social
DONE * [metadata] Successfuly fetched metadata of chaos.social
DONE * [metadata] Successfuly updated metadata of chaos.social
📌 Environment
Misskey versions: 13.7.5 / 13.8.0 / 13.8.1 Your OS: Debian 11 Your browser: all
sharpがICOはサポートしていないせいだと聞きました / I heard this is because sharp does not support ICO format.
I don't know what this sharp is, but is there a fix for it?
ここから発生していますね / It's coming from here:
https://github.com/misskey-dev/misskey/blob/81e6a21fe06633adf50acd089f2005dfb10b95d4/packages/backend/src/server/FileServerService.ts#L261-L275
多分ICOファイルはそのまま使っていいかもです。/ I guess it's probably fine to skip conversion for ICO files 🤔
icoファイルは大変大きいので、クライアントに読ませるのは避けたい
ico 自体のデコードは楽なはず (e.g. https://github.com/image-rs/image/blob/master/src/codecs/ico/decoder.rs) なのでなんとかなってほしい
This seems mostly affect custom favicons.
As long as it doesn't work properly, I've switched it off for now.
インスタンスのアイコンにこんなにico突っ込まれてたっけ?
ico 自体のデコードは楽なはず
実装が簡単とは言わなかったな?
Yes, it should usually display as shown in the screenshot.

It just doesn't seem to work with custom favicons. Not even with my Misskey instance's own custom favicon.
media-proxy v0.0.17で対応した
本体メディアプロキシはまだ