Skip to content

Add option to show original image in viewer instead of showing a preview#3118

Open
david-brauer wants to merge 1 commit intonextcloud:masterfrom
david-brauer:add-setting-to-disable-preview-in-viewer
Open

Add option to show original image in viewer instead of showing a preview#3118
david-brauer wants to merge 1 commit intonextcloud:masterfrom
david-brauer:add-setting-to-disable-preview-in-viewer

Conversation

@david-brauer
Copy link
Copy Markdown

This is a PR to integrate a simple option to disable previews for images in the viewer. I'm still pretty new to nextcloud development and I don't really know VueJS. So this might not be up to some code standards. If you know a thing I can improve leave a comment and I will try to adapt it.

I know this topic has a very long discussion history with both sides actually having solid use cases for showing previews vs. showing original Images. As someone who only has Images that are 1-2 MB in size I never really had the urge for preview files and instead would like to see the full resolution image.
In my opinion the best solution for the issue is having a setting so that both sides can be happy.

With my change I added a setting that can be set via config.php to disable the previews in the viewer. The default case still remains the same so that previews are being displayed. Anyone that does want to view original images however can set the Option disable_preview_in_viewer to true and get the original image shown.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@szaimen szaimen requested review from skjnldsv and starypatyk April 16, 2026 13:31
@szaimen szaimen added enhancement New feature or request 3. to review Waiting for reviews labels Apr 16, 2026
@szaimen szaimen added this to the Nextcloud 34 milestone Apr 16, 2026
Copy link
Copy Markdown
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this should be done using the system config.
Maybe using the app config, but even then it sounds not really good to add another configuration for this.

Maybe this should rather be fully frontend by adding a "view full resolution" action to the viewer?

What exactly is the use case? The viewer should already fetch a preview in reasonable resolution based on your viewport.

@david-brauer
Copy link
Copy Markdown
Author

I do not think this should be done using the system config. Maybe using the app config, but even then it sounds not really good to add another configuration for this.

Maybe this should rather be fully frontend by adding a "view full resolution" action to the viewer?

What exactly is the use case? The viewer should already fetch a preview in reasonable resolution based on your viewport.

On my server the preview files take up a lot of space. With the change I could limit the preview maximum size to something like 1024x1024 or even 512x512. Those would take up less space, be sufficient for list views and are faster to generate.

Also for my setup with relatively small image sizes there isn't that much of a loading speed difference between loading the full file and loading the preview.

The button would technically be an option but you probably would still need to re-click it for every image when navigating through the pictures. It also would always load the preview even when you want the full image (even though I could probably live with that).

Copy link
Copy Markdown
Contributor

@starypatyk starypatyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to me like a simple solution to #3014.

I have verified that the code behaves as described, but I do not feel qualified to say that it is (or is not) in-line with overall vision of Nextcloud.

Given that Viewer is so tightly integrated with Nextcloud core, having such setting in the main config file does not look out of place to me.

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

Labels

3. to review Waiting for reviews enhancement New feature or request feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants