From 6e5dc1e2c01d327c5f4f5cc24c1f841972bc1d65 Mon Sep 17 00:00:00 2001 From: omnizs38 Date: Thu, 2 Jul 2026 00:46:43 +0500 Subject: [PATCH] fix(image): auto-scale embedded images to fit their container Embedded images were not reliably scaled to fit the available width, and tall images could overflow the surrounding frame instead of being shrunk to be fully visible. Constrain the rendered image with max-width: 100% and object-fit: contain while letting width and height stay auto, so the whole image is always visible and the frame adjusts to the image's real aspect ratio without reserving fixed empty space. Signed-off-by: omnizs38 --- src/nodes/ImageView.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index dda5e255433..6d4394d9cd6 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -516,7 +516,11 @@ export default { } .image__main { + max-width: 100%; max-height: calc(100vh - 50px - 50px); + width: auto; + height: auto; + object-fit: contain; margin: auto; } @@ -536,6 +540,7 @@ export default { img { max-width: 100%; + height: auto; } &:hover {