Small images display at native tiny size in Viewer — no minimum scale applied
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 119
- Forks
- 72
- Avg merge
- 18h 42m
- Merged PRs (30d)
- 24
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in FilePreview.vue at imageContainerStyle and inspect how the 600×384 px constraints calculate the image scale. Reproduce with the 840×91 px and 458×57 px PNG examples, then verify that both open in the Viewer at a readable size rather than leaving the smaller image at native 1:1 dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100