Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Small images display at native tiny size in Viewer — no minimum scale applied

オープン 初心者向け
#3,196 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
javascript
領域
frontend

調査の方向性

FilePreview.vue の imageContainerStyle から始め、600×384 px の制約によって画像のスケールがどのように計算されるかを調べてください。840×91 px と 458×57 px の PNG の例で再現し、その後、どちらも Viewer で読みやすいサイズで開かれ、小さい方の画像がネイティブの 1:1 の寸法のままにならないことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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

  1. 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)
  2. Click Image A → opens visibly larger than the chat thumbnail ✓
  3. 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)
主要言語
JavaScript
スター
121
フォーク
70
平均マージ
1日 3時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/viewer のほかの issue

nextcloud/viewer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。