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

Restrict size of image and video thumbnails #5682

Closed
wants to merge 6 commits into from
2 changes: 1 addition & 1 deletion res/css/views/messages/_MVideoBody.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
span.mx_MVideoBody {
video.mx_MVideoBody {
max-width: 100%;
height: auto;
max-height: 300px;
border-radius: 4px;
}
}
2 changes: 1 addition & 1 deletion src/components/views/messages/MImageBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export default class MImageBody extends React.Component {
}

// The maximum height of the thumbnail as it is rendered as an <img>
const maxHeight = Math.min(this.props.maxImageHeight || 600, infoHeight);
const maxHeight = Math.min(this.props.maxImageHeight || 240, infoHeight);
// The maximum width of the thumbnail, as dictated by its natural
// maximum height.
const maxWidth = infoWidth * maxHeight / infoHeight;
Expand Down