element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
GNU Affero General Public License v3.0
1.73k stars 492 forks source link

Markdown images with mxc:// URLs are not displayed #7757

Open nukeop opened 7 months ago

nukeop commented 7 months ago

Steps to reproduce

Whenever somebody sends a message formatted with Markdown, and it includes an image with an mxc:// URL (for example ![](mxc://matrix.example.com/image)), the image is not displayed. The image is correctly displayed in the web client.

To reproduce:

Outcome

What did you expect?

I expected the image to be visible in all clients.

What happened instead?

The iOS client displays an empty message.

Your phone model

iPhone 11

Operating system version

iOS 17.2.1

Application version

1.11.7

Homeserver

Synapse v1.98.0

Will you send logs?

No

nukeop commented 4 months ago

Any updates on this?

nukeop commented 4 months ago

Bump

arychj commented 4 months ago

Don't bother. This has been an issue since at least 2017, I don't think they have any intention of fixing it at this point.

nukeop commented 4 months ago

Heheh. I am sure this is just a matter of getting it in front of someone calling the shots.

arychj commented 4 months ago

Yeah. We were really trying to migrate off of Slack, but needed to be able to post graphs and charts in chat via the API. The best solution we were able to come up with was publishing the images to a public URL and posting the URL to the chat, rather than trying to embed them as Matrix resources. It "worked" but ultimately we had to reject Matrix as a solution since the images weren't really viewable in the app at that point (even with thumbnails enabled).

nukeop commented 4 months ago

I do the same thing, because the Node SDK is really hard to use when you're uploading images. So I take the mxc URL, and put it in Markdown. In the web client, the images are visible, but in the iOS client, they're not. I see you have already uncovered that the links are improperly escaped.