Skip to content

Allow higher max width (16:9) for landscape image embeds#32626

Open
weirdreality wants to merge 2 commits intoelement-hq:developfrom
weirdreality:patch-1
Open

Allow higher max width (16:9) for landscape image embeds#32626
weirdreality wants to merge 2 commits intoelement-hq:developfrom
weirdreality:patch-1

Conversation

@weirdreality
Copy link

@weirdreality weirdreality commented Feb 25, 2026

References #19869

"Landscape" images (images with width > height) are forced into a maximum width or height of 324 pixels, which can be too small on modern screens. Considering that Element is also most often used on landscape screens, and inspired by behavior in other chat clients (namely Discord as mentioned in #19869 (comment)), the limit for the width is increased by a ratio of 16:9 to give a maximum width of 576 pixels. This would help with the extreme cases as mentioned in #19869.

I would not consider #19869 fully fixed as there is still the behavior for "portrait" images added in 8860916 which reduces the maximum width further to 9:16 of 324 which is 183 pixels. This happens on any image where the height is higher than the width, even by 1 pixel. I would suggest removing this behavior in favor of just the landscape dimensions, or deciding whether to use it based on the screen/viewport dimensions and not the size of individual images. I could do this in this PR if requested but I wouldn't know about writing tests as I am not familiar with this codebase.

The issue 7188 mentioned in 8860916 seems completely unrelated so I can't find the reasoning for why this was put in at all.

Checklist

@dbkr
Copy link
Member

dbkr commented Feb 25, 2026

Could you upload a screenshot showing what this looks like so a designer can take a look?

@weirdreality
Copy link
Author

weirdreality commented Feb 26, 2026

Before:
image

After:
image

With window width shrunk to 1500 (after that the image shrinks to fit the screen anyway):

Before:
image

After:
image

The image from #19869:

Before:
image

After:
image

@dbkr dbkr requested a review from a team February 26, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Enhancement Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants