Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use original image instead of generated thumbnail for previews #8614

Open
illode opened this issue Mar 11, 2024 · 0 comments
Open

Comments

@illode
Copy link

illode commented Mar 11, 2024

Is your feature request related to a problem? Please describe.

These are two fairly related things - the lack of 1 made me think of 2, but maybe should be two separate feature requests. Let me know if I should split it.

  1. There doesn't seem to be a way to view an image at it's original resolution. Instead, the user has to download it.

  2. Image previews often needlessly generate thumbnails. The thumbnail generation can be extremely slow as seen by OCIS becomes unresponsive when browsing images in frontend #6874.
    For context, I have OCIS running in a VM with 6 cpus via cloud-hyperviser on a 3900x. If I clear the thumbnails and click on a particularly large gif, the cpus get maxed out and the whole VM slows down for several minutes as it generates thumbnails. If I have a huge image, the same thing happens, but on the scale of seconds instead of minutes. The problem is, generating those higher-resolution thumbnails is completely useless. The smaller sizes for file browsing (16x16, 32x32, etc.) make sense, but generating the large sizes (1920x1080, 2560x1440, etc) doesn't for my use case. I would much rather sacrifice bandwidth than sacrifice processing power. It's only worth generating large thumbnails for images with absurd filesizes, and even then only for static images. Large thumbnails for gifs are simply never worthwhile due to the fact that they hog so much cpu.

Describe the solution you'd like

  1. I think adding a simple "View Original" button to the preview would be nice regardless of point 2. Example from onedrive:
    image

  2. There should be a way to tell OCIS to use the original image instead of large thumbnails under certain conditions. Some ideas:

    • There should be a setting / env var to always use the original image for previews, something like WEB_OPTION_PREVIEW_USE_ORIGINAL=true
    • Similar to the above, but do it based on filesize, e.g, WEB_OPTION_PREVIEW_USE_ORIGINAL_FILE_SIZE=8mb, and any images below that size would simply use the original instead.
    • Add an option for static gif previews, e.g. THUMBNAILS_ANIMATE_GIF_PREVIEW. I really like the dynamic gif previews, but as I've mentioned, downscaling the entirety of a large gif just to save a few mb is not worth the cpu cycles. Downscaling just the first frame the gif would be much less cpu intensive. This is my least favorite solution, but is probably the most important one for people with weaker hardware.

After writing this down, I've come to the conclusion that the existing thumbnail options, as well as my suggestions, should probably be split into two separate categories: thumbnails and previews (views? image views? preview is bad IMO). The former being the small images used as thumbnails while browsing, and the latter being the large image shown when clicking on an image to view it. As it stands, the wording used in the docs isn't very clear. It's not obvious at first that the thumbnails service is what provides the large previews when clicking an image, nor those large previews even exist. I just assumed clicking would get me the original resolution.

Describe alternatives you've considered

  1. There are none
  2. There are none

Additional context

Overall, really liking OCIS. Fast, user friendly, supports file sync, and has a nice and clean UI. My only two complaints are media related things like this / #7373 / #7127, and the docs being all over the place.

@micbar micbar mentioned this issue Jun 19, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant