nextcloud / viewer

🖼 Simple file viewer with slideshow for media
GNU Affero General Public License v3.0
97 stars 55 forks source link

Uploaded photos are not shown in full size #1205

Open Sverik opened 2 years ago

Sverik commented 2 years ago

Describe the bug Uploading an image file and viewing it in Photos does not fill all available space on screen. It's difficult to describe, screenshots are attached. I downloaded the example Frog.jpg image, renamed it to test.jpg and uploaded it. Opening Frog.jpg shows it as expected, really big on the screen. Opening test.jpg shows it much smaller.

Original Frog.jpg: Frog.jpg

Downloaded and uploaded as test.jpg: test.jpg

To Reproduce Steps to reproduce the behavior:

  1. Upload an image file
  2. Go to Photos
  3. Navigate to the image that was just uploaded
  4. Click on it to view

Expected behavior Image is as big as possible on the page, leaving not much space around it.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

skjnldsv commented 2 years ago

What is you max preview generation config as well as your screen resolution please?

Sverik commented 2 years ago

Screen is 4k. And indeed, it was all about preview_max_x and preview_max_y, these were set to 1000. Thanks for pointing me to the correct configuration parameter!

skjnldsv commented 2 years ago

We should improve and show a warning or something tbh :thinking: Thoughts @nextcloud/server ?

If it's under 4k, let's show a warning/info in the instance setup checks?

szaimen commented 2 years ago

PR here: https://github.com/nextcloud/server/pull/31938

derMart commented 1 year ago

IMHO, the preview settings should not be relevant here. If a user opens an image (showing its detail view so to speak), the actual image should be loaded, not a preview. Also, it would be nice to have zoom and pan controls.

skjnldsv commented 1 year ago

@derMart not all images are compatible with a browser, and it doesn't make sense to load 150MB raw jpeg if you want to preview it. This has been discussed in the past and decided against it.

derMart commented 1 year ago

@skjnldsv Sure, for images which are not browser compatible a preview can be shown. But well, the 150mb raw jpeg (jpegs are not raw btw., they are always compressed lossy and are always demosaiced) is most probably an edge case. Even large RAW files are usually only around 30mb, very big jpegs hardly ever exceed 10mb. That is not a problem at all for todays inet bandwidth.

Would you mind guiding me to the discussion you refer to? I am not sure where to find it, or which you refer to. There is this issue: https://github.com/nextcloud/viewer/issues/578 but the majority of participants there is for an easy possibility to see the actual images.

skjnldsv commented 1 year ago

That is not a problem at all for todays inet bandwidth.

that's not true. Lots of people don't have high performance bandwiths nowadays. Nextcloud is heavy enough already and is being used in a lot of area of the world :)

Would you mind guiding me to the discussion you refer to? I am not sure where to find it

578 seems like a good start. I remember online chats and calls about this too

jospoortvliet commented 12 months ago

That is not a problem at all for todays inet bandwidth.

that's not true. Lots of people don't have high performance bandwiths nowadays. Nextcloud is heavy enough already and is being used in a lot of area of the world :)

Would you mind guiding me to the discussion you refer to? I am not sure where to find it

578 seems like a good start. I remember online chats and calls about this too

Perhaps (as said in https://github.com/nextcloud/server/pull/31938#issuecomment-1805233453 ) and suggested by others before, an ideal approach would be what the mobile apps do, afaik - load the preview first, then start loading the full image. Then we set the preview size to 1080P by default. As some original formats are already smaller (HEIC is more efficient), 4K previews really make no sense anymore for photos. Loading a 1080P preview and then the full image would lower bandwidth usage with the new file formats. It would show the image soonest AND at max quality after a second or 3 longer...

regs01 commented 1 month ago

Even mobile apps do not need previews. Just thumbnails. Those are not huge video files. Even them are being fed to client in gigabytes of original files directly without transcoding, while little photos are being transcoded. This is just makes no sense.

Or just make an option. So those who don't need previews wouldn't have them eating up the space.