project-robius / robrix

Robrix: a multi-platform Matrix chat client written in Rust using the Makepad UI toolkit and the Robius app dev framework
MIT License
107 stars 18 forks source link

Fetch and display image thumbnails in the timeline instead of the full-resolution image #271

Open kevinaboos opened 4 hours ago

kevinaboos commented 4 hours ago

Currently Robrix always requests the full-resolution image when displaying MessageType::Images in the timeline. This is unnecessary and wasteful, both in terms of bandwidth usage and in terms of the performance cost of decoding the full image.

The original reason behind this is that very early versions of Robrix and/or the Matrix SDK had problems properly retrieving a thumbnail-sized image. But that should work properly now.

Thus, we should request thumbnails of each image in the timeline instead of the full image.


The second part of this is to actually fetch the full image when the user clicks an image thumbnail, and then display that image in a full-screen view. This can be done as part of this issue, or left to a future separate issue, as it requires more effort to design and implement a pop-up image viewer with a loading spinner.