element-hq / element-hq/synapse

Preview of uploaded BMP image doesn't work (image opens fine)

Open
#15,990 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-URL-Preview O-Uncommon S-Minor T-Defect
Dominant language
Python
Stars
4.6k
Forks
607
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from #15990.


Originally reported at vector-im/element-meta#1916, but this seems to be a server issue.

Example image: https://people.math.sc.edu/Burkardt/data/bmp/blackbuck.bmp

An encrypted room just shows an empty box:

The /thumbnail endpoint returns (https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/UOupUIqZCoSRCUJTmNLthUgX?width=800&height=600&method=scale):

{
    "errcode":"M_UNKNOWN",
    "error":"Cannot find any thumbnails for the requested media ([b'matrix.org', b'UOupUIqZCoSRCUJTmNLthUgX']). This might mean the media is not a supported_media_format=(image/jpeg, image/jpg, image/webp, image/gif, image/png) or that thumbnailing failed for some other reason. (Dynamic thumbnails are disabled on this server.)"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the /thumbnail endpoint and reproduce the failure with the linked blackbuck.bmp image, checking how the listed supported media formats are handled. Done means the endpoint returns a usable thumbnail for BMP uploads and the preview no longer shows an empty box.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.