You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
experimental fix for https://github.com/vector-im/riot-web/issues/2985
needs server to support 1600x1200 thumbnails for retina large ones. ideally need to cap maximum thumbnail size to 800x600 rather than expand to arbitrary widths. need to check that luke's funky timeline code doesn't get confused between naturalWidth and infoWidth etc. also need to consider whether to encode a resolution metric in the event rather than lying about resolution.
This commit is contained in:
@@ -179,10 +179,16 @@ export default class MImageBody extends React.Component {
|
||||
// given we deliberately don't thumbnail them serverside to prevent
|
||||
// billion lol attacks and similar
|
||||
return this.context.matrixClient.mxcUrlToHttp(
|
||||
content.info.thumbnail_url, 800, 600,
|
||||
content.info.thumbnail_url,
|
||||
800 * window.devicePixelRatio,
|
||||
600 * window.devicePixelRatio,
|
||||
);
|
||||
} else {
|
||||
return this.context.matrixClient.mxcUrlToHttp(content.url, 800, 600);
|
||||
return this.context.matrixClient.mxcUrlToHttp(
|
||||
content.url,
|
||||
800 * window.devicePixelRatio,
|
||||
600 * window.devicePixelRatio
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user