In every Discourse site’s manifest.json file, a list of icons are shown. For each icon, a “type” is provided which looks to be the icon’s mime type. Problem is, regardless of which format the icon actually is (ico, jpeg, svg), the provided type is image/png.
Yup - the file mainly supports the Android “Save to Homescreen” feature which then opens up that site as an app (Chrome WebView).
Other software projects nowadays rely on that file as well for their own webapp needs. Such as when Ubuntu had Unity Webapps which allows a saved site to have their own icon in the Unity Launcher.
I wouldn’t be surprised if more sites use that file, though I can’t personally list anymore.
The easiest fix is only using large icon url there. However most Discourse instances doesn’t fill this field and will lose the add to homescreen banner then.
It’s not perfect without downloading and inspecting the file itself, but I’ve added a “best effort” educated guess at figuring out the mime type from the filename alone which should resolve the common cases: