Add option to show original image in viewer instead of showing a preview#3118
Add option to show original image in viewer instead of showing a preview#3118david-brauer wants to merge 1 commit intonextcloud:masterfrom
Conversation
|
Hello there, 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.) |
susnux
left a comment
There was a problem hiding this comment.
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). |
starypatyk
left a comment
There was a problem hiding this comment.
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.
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_viewerto true and get the original image shown.