webp images don't appear to thumbnail correctly, sometimes #13607
Description
Tested with image: https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/NhXqgLrnxWBLDijZfPdkebex?width=800&height=600&method=scale
The event:
{
"content": {
"body": "1.sm.webp",
"info": {
"h": 214,
"mimetype": "image/webp",
"size": 10474,
"thumbnail_info": {
"h": 214,
"mimetype": "image/png",
"size": 111399,
"w": 320
},
"thumbnail_url": "mxc://matrix.org/IERMYhtRkHBmQPJAQvPkKjSM",
"w": 320,
"xyz.amorgan.blurhash": "L:CHWyR-RPae.TRkR*oM.8WYR.f6"
},
"msgtype": "m.image",
"url": "mxc://matrix.org/NhXqgLrnxWBLDijZfPdkebex"
},
"origin_server_ts": 1661287579310,
"sender": "@travisr_github:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 16824,
"transaction_id": "m1661287578061.1"
},
"event_id": "$szqt1kDU19np2xfg7l0vStUF-tr6wHyrYcYUtFo8_jo",
"room_id": "!GGEAWumnYnZnKVDuDO:matrix.org"
}
The image: https://www.gstatic.com/webp/gallery/1.webp
For matrix.org users, it looks something like this because of the 400 HTTP error code:
on alternative (😇) media repos it appears to work fine:
Note: I don't know what the error could be on matrix.org's side. Some people report being able to see the thumbnail correctly, so presumably it's something to do with sizing/method combination from different devices and/or client decisions?
Also tested with mxc://t2l.io/21fb55d639cc38839f3e1b6eb3846487aa1dfcc3
(thumbnailed as mxc://t2l.io/f624dc59738478bab082190fe1234b194b7e63c9
) with similar results.