镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

perf(preview): limit the max preview size of non-image files - #65147

Open
CarlSchwan wants to merge 1 commit into
masterfrom
carl/preview-non-image-size
Open

CarlSchwan wants to merge 1 commit into
masterfrom
carl/preview-non-image-size

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member

Summary

Only images have their max preview shown in the viewer, for other files the largest preview the UI requests is the one of the sidebar. Still, their max preview was rendered at up to 4096x4096 px: the text preview draws a 4096x4096 image with a 128px font, which every smaller preview then has to decode again. Limit the max preview of non-image files to 1024px.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@CarlSchwan CarlSchwan added this to the Nextcloud 36 milestone Oct 5, 2026
@CarlSchwan CarlSchwan self-assigned this Oct 5, 2026
@CarlSchwan
CarlSchwan requested a review from a team as a code owner October 5, 2026 15:02
@CarlSchwan
CarlSchwan requested review from leftybournes, provokateurin, salmart-dev and sorbaugh and removed request for a team October 5, 2026 15:02
Only images have their max preview shown in the viewer, for other files
the largest preview the UI requests is the one of the sidebar. Still,
their max preview was rendered at up to 4096x4096 px: the text preview
draws a 4096x4096 image with a 128px font, which every smaller preview
then has to decode again. Limit the max preview of non-image files to
1024px.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan force-pushed the carl/preview-non-image-size branch from ac6191b to 5190e69 Compare October 5, 2026 17:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants