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:
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 forInlineImage.We should also do this for
MessageImagePreview. This will most likely involve moving the dynamic sizing code fromInlineImageto the shared_Imagehelper. 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: