Bug description
When a shared image fits entirely within Talk's preview constraints
(600 px wide Γ 384 px tall), it is shown at native 1:1 pixel size β
both as a chat thumbnail and when opened in the Viewer.
For small images this makes the Viewer indistinguishable from the thumbnail:
clicking the image appears to do nothing useful.
The Viewer should always scale images to fill a readable portion of the
viewport, regardless of native dimensions.
Steps to reproduce
- Share two PNG images in a Talk room:
- Image A: 840Γ91 px (wider than 600 px constraint)
- Image B: 458Γ57 px (fits within 600Γ384 px β both dimensions smaller)
- Click Image A β opens visibly larger than the chat thumbnail β
- Click Image B β appears the same tiny size as the chat thumbnail β
Expected behavior
Both images open in the Viewer scaled to a readable size,
regardless of their native pixel dimensions.
Actual behavior
Image B (458Γ57 px) is displayed at 1:1 native pixels.
The Viewer popup looks identical in size to the inline chat thumbnail.
Both images return the same Talk API metadata:
{ "mimetype": "image/png", "preview-available": "yes" }
The only difference is width/height.
Root cause
FilePreview.vue β imageContainerStyle:
const sizeMultiplicator = Math.min(
(heightConstraint > height ? 1 : heightConstraint / height),
(widthConstraint > width ? 1 : widthConstraint / width)
)
When both dimensions are below the constraints (600Γ384 px),
sizeMultiplicator = Math.min(1, 1) = 1.
There is no lower bound β images are never scaled up.
Image A (840Γ91): width exceeds 600 px β sizeMultiplicator = 600/840 = 0.71
β displayed at 600Γ65 px (noticeably larger than thumbnail) β
Image B (458Γ57): both dimensions fit β sizeMultiplicator = 1
β displayed at 458Γ57 px (same as thumbnail) β
Environment
- Nextcloud: 33.0.4
- Nextcloud Talk: 23.0.5
- Browsers: Chrome 148, Safari β Windows, macOS, web (all platforms)
Bug description
When a shared image fits entirely within Talk's preview constraints
(600 px wide Γ 384 px tall), it is shown at native 1:1 pixel size β
both as a chat thumbnail and when opened in the Viewer.
For small images this makes the Viewer indistinguishable from the thumbnail:
clicking the image appears to do nothing useful.
The Viewer should always scale images to fill a readable portion of the
viewport, regardless of native dimensions.
Steps to reproduce
Expected behavior
Both images open in the Viewer scaled to a readable size,
regardless of their native pixel dimensions.
Actual behavior
Image B (458Γ57 px) is displayed at 1:1 native pixels.
The Viewer popup looks identical in size to the inline chat thumbnail.
Both images return the same Talk API metadata:
{ "mimetype": "image/png", "preview-available": "yes" }The only difference is
width/height.Root cause
FilePreview.vueβimageContainerStyle:When both dimensions are below the constraints (600Γ384 px),
sizeMultiplicator = Math.min(1, 1) = 1.There is no lower bound β images are never scaled up.
Image A (840Γ91): width exceeds 600 px β
sizeMultiplicator = 600/840 = 0.71β displayed at 600Γ65 px (noticeably larger than thumbnail) β
Image B (458Γ57): both dimensions fit β
sizeMultiplicator = 1β displayed at 458Γ57 px (same as thumbnail) β
Environment