viewer icon indicating copy to clipboard operation
viewer copied to clipboard

Uploaded photos are not shown in full size

Open Sverik opened this issue 2 years ago • 10 comments

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):

  • Fedora 35, kernel 5.16.18-200
  • Google Chrome 100.0.4896.75
  • Nextcloud 23 running in Docker, image nextcloud:23, updated to 23.0.3

Sverik avatar Apr 11 '22 18:04 Sverik

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

skjnldsv avatar Apr 11 '22 19:04 skjnldsv

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!

Sverik avatar Apr 11 '22 19:04 Sverik

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?

skjnldsv avatar Apr 12 '22 06:04 skjnldsv

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

szaimen avatar Apr 12 '22 08:04 szaimen

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.

derMart avatar Jul 10 '23 16:07 derMart

@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.

skjnldsv avatar Jul 10 '23 17:07 skjnldsv

@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.

derMart avatar Jul 10 '23 18:07 derMart

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

skjnldsv avatar Jul 10 '23 18:07 skjnldsv

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...

jospoortvliet avatar Nov 10 '23 07:11 jospoortvliet