Issue with Nextcloud Preview

I spent a little time with Nextcloud Preview today. More with previews in general. The app Previewgenerator works ok.

On one of my Nextclouds I have about 750 MB of images and a preview folder of 1000 MB. I think that’s a bit disproportionate.

I deleted the folder preview and then:

sudo -u www-data php files:scan-app-data
sudo -u www-data php occ preview:generate-all

I then looked in the documentation l and realised that there is no maximum size in the default configuration.

  'preview_max_x' => null,
  'preview_max_y' => zero,

I now use

  'preview_max_x' => 1024,
  'preview_max_y' => 1024,

Now I only need only 150 MB instead of 1000 MB. Of course, the preview images are smaller. But if you have a lot of images, it does make a difference.

Question:
If you use the maximum size as a preview anyway, couldn’t you just use the original image? Maybe index.php/core/preview?fileId= can direct link to the original image. Then the preview mit orginal size is not needed. :wink: Or have I misunderstood something here? A security risk? What do you think are sensible preview values for today’s camera resolutions? It cannot and must not be the case in the standard configuration that the previews end up taking up more space than the images themselves.

The default is 4096 (for preview_max_x and preview_max_y)

Thanks. Do you think it is useful to almost douple the needed space this this big preview?

I think it would be useful if Nextcloud would automatically load the original in certain situations where a higher resolution than the maximum preview setting might be desirable, e.g. when you zoom in or switch to full screen and the maximum preview resolution is lower than the screen resolution, and ideally it would be configurable if and in which situations this should happen.

But then again, Nextcloud is not primarily a photo management software… :wink:

1 Like

Ultimately, it’s up to you. Are you using Nextcloud as a photo gallery on a high resolution screen, or are you using it as a productivity suite, which is what I understand it to be? For the latter a preview size of 1024 might be more than enough, because you would have to download the files anyway to do whatever you want to do with them, :wink:

Nonetheless, the feature I suggested in my previous post would help to blur these lines somewhat as it would give users more flexibility in balancing quality, performance and storage space.

That being said, someone using Nextcloud primarily as a photo gallery on a 4K screen would probably still need to choose a preview size of 2048 or more likely 4096 as anything below that would not look good and loading the original of each photo would be too slow.

However, loading the original when zooming in would definitely be a useful feature, even if you see Nextcloud strictly as a productivity suite, and no matter what preview size you use :slight_smile:

1 Like