Skip to content

Use fixed height and derive width from aspect ratio for MessageImagePreview #2344

Description

@Ruhdee

Web introduced dynamic sizing for both image previews and inline images to implement the media_preview_size. Web does this by deciding a fixed height and deriving width from it while preserving the aspect ratio. We already do this for InlineImage.

We should also do this for MessageImagePreview. This will most likely involve moving the dynamic sizing code from InlineImage to the shared _Image helper. It also makes sense to make the spacing adjustments from PR zulip/zulip#38324 (mentioned in #2206), except those specific to inline image galleries, as a part of this issue.

This issue is a prerequisite for #2177.

References:

Metadata

Metadata

Assignees

Labels

a-designVisual and UX design

Type

No type

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions