Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7c9df71

Browse files
authored
Merge pull request #6514 from matrix-org/palid/fix/image-placeholders-incorrect-height
Fix incorrect height for encoded placeholder images
2 parents 8509096 + 7b6536c commit 7c9df71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/views/messages/MImageBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
366366
}
367367

368368
const thumbnail = (
369-
<div className="mx_MImageBody_thumbnail_container" style={{ maxHeight: maxHeight + "px", maxWidth: maxWidth + "px" }}>
369+
<div className="mx_MImageBody_thumbnail_container" style={{ maxHeight: maxHeight, maxWidth: maxWidth, aspectRatio: `${infoWidth}/${infoHeight}` }}>
370370
{ showPlaceholder &&
371371
<div
372372
className="mx_MImageBody_thumbnail"

0 commit comments

Comments
 (0)