Repository navigation
fix(preview): keep detail when zooming into tall images - #18102
Open
lavinhoque33 wants to merge 1 commit into
Open
lavinhoque33 wants to merge 1 commit into
lavinhoque33 wants to merge 1 commit into
Conversation
lavinhoque33
added a commit
to lavinhoque33/nextcloud-zoom
that referenced
this pull request
Nov 21, 2026
Same behavior; cleanup for upstream review: shared decode helper, zoom levels in a testable DetailZoomScaleLevels, unit tests.
Tall images such as comic strips or long screenshots are unreadable in the image viewer at every zoom level. Images that are not downloaded are shown from a preview of half the screen size, downloaded ones are decoded to fit the screen, and PhotoView stops zooming at 3x the fitted size, so a 540x21242 image never gets wider than about 180 pixels on screen. The viewer now loads a preview twice the screen's short side, or the downloaded file at up to 16 MP, and derives its zoom levels from the image's shape. The larger preview is not written to the thumbnail cache, so the cache keeps its current size. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Iram Tazim Hoque <14330893+lavinhoque33@users.noreply.github.com>
lavinhoque33
force-pushed
the
fix/viewer-full-resolution-zoom
branch
from
November 21, 2026 23:58
1d568f9 to
77b4fe1
Compare
lavinhoque33
marked this pull request as ready for review
November 22, 2026 00:02
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Very tall images (comic strips, long screenshots, scanned receipts) cannot be read in the image viewer: they look blurry at every zoom level.
For a 540×21242 image on a 1080×2400 phone:
x=540&y=1170), which comes back about 30 pixels wide.Changes
mode=cover, which returns tall images at full width. This larger preview is not written to the thumbnail cache. If loading it fails, the cached preview stays on screen instead of an error.Gallery thumbnails and the preview cache are unchanged.
Trade-off:
preview_max_x/preview_max_y(default 4096). Strips taller than that need the admin to raisepreview_max_yto get full width. Without that, they improve only as far as the cap allows.Related: #15137 (full-resolution viewing of not-downloaded images, closed as not planned).
How to test
preview_max_yto 32768 inconfig.php.🖼️ Screenshots
A 540×21242 test image, not downloaded, on a 1080×2340 phone. Before: maximum pinch zoom. After: one double tap.
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)
Tested on a live Nextcloud server with an Android phone (1080×2340) and the 540×21242 image above.