Gallery app not using previews generated by Preview Generator

Hi guys,

I installed NextCloud on my RP3 using NextCloudPi, everything seems to be working well except for one thing. I store many large photos on my NextCloud, and having run occ preview:generate-all whenever I browse the web interface in list view the photo thumbnails load straight away.

However, if I switch to Gallery view it takes ages for the larger thumbnails to appear which leads me to believe that the Gallery app is not using the thumbnails generated by Preview Generator.

I was under the impression that in NextCloud 12, the Gallery app had been updated to use the same generated previews? I donā€™t see anything obvious in the logs pointing to a problem.

Iā€™m using:

NextCloud 12.0.2
Gallery 17.0.0
Preview Generator 1.0.6

Could anyone point me in the right direction?

Thanks!

@rullzer @oparoz can you comment? I was under the same assumption with NC12

It is using them. Just the way the gallery app retrieves files is a bit more resource intensive. We still wan to fix this at some point but currently non of the engineers has the time.

1 Like

Thanks for confirming @rullzer. Itā€™s strange though as it takes a really long time, as in, as long as it would take to generate the thumbnails if I hadnā€™t run occ preview:generate-all.

Is there anyway I can confirm that it is actually using the thumbnails generated by Preview Generator?

Hello there,
I have the feeling I am in the same situation. Preview files are created in the app/preview folder but gallery (18.0 on NC 13, up to date) seems to be as slow for the first use (when I assume the generation takes place) as for later uses (where I would expect pregenerated files to be used).
I have deleted all preview configs in my config.php to get back to default with no change.
Any ideas? Any way to check that gallery indeed uses the previewed files?
When displaying the same image folder on another instance (from a friend, hosted on a similar sever), it is blazingly fast after the first run that is presumably used to generate previews, on my instance it is always the same ā€œslowā€ speed.

Same issue here, or even worse. 4 days ago I ran preview:generate-all, it took another 2 days for all photos to be ā€˜thumbnailizedā€™. It was then ok for the next couple of days until this morning when gallery started creating new thumbnails on demand (while accessing folders).

Funny thing is that previously generated thumbnails remain untouched. My preview folder is now 22GB and keeps growing as previously generated thumbnails are left and new (duplicate ones) get created.

Can anyone explain if Iā€™m missing something here or has NC gone nuts? Iā€™m under impression that Iā€™m gonna soon run out of space thanks to ever-repeating thumbnail creation processā€¦
Thanks :slight_smile:

Try to limit previews size in config.php to e.g. 1024 (basically if you need bigger, you can download original image already). For me it works fine, it reduced previews folder from 20+ Gb to 6Gb.

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

More about this config under https://docs.nextcloud.com/server/14/admin_manual/configuration_server/config_sample_php_parameters.html#previews

You can also added occ preview:pre-generate to cron to create new previews automatically.

1 Like

Hi,

Thanks for your reply.
I tried limiting thumbnail dimensions already, it was not too satisfactory but helped a little bit in terms of time required for all previews to be generated.
pre-generate is also a cron job executed every 15min.

Thatā€™s not really the issue though, Iā€™d like to understand why new previews are generated if I already have the whole lot done couple of days ago. I thought that once created, those previews should stay and be used by both files and gallery apps. Isnā€™t it so?

This is a serious issue because it

  • generates unnecessary load on my server each time I wanna view photos
  • eats up disk space (duplicate previews)
  • makes photo viewing a nightmare (waiting for previews to be generated each time a folder is opened)

Iā€™ll happily provide any log information required, just point me where I should look.
Thanks.

1 Like

Then open a ticket. I found similar one, but nobody checked there why folder is so big: https://github.com/rullzer/previewgenerator/issues/129

P.S. It turns that changing of config.php will not automatically recreate smaller/bigger previews. This is how to do it https://github.com/rullzer/previewgenerator/issues/94#issuecomment-355745556 run pregenerate command afterwards.

@rullzer Hi! Sorry to bother, but since in the past year and a half there hasnā€™t been any substantial update regarding this issue, I wonder if any changes to solve this problem are still on the schedule? Thanks!

I also have the same issue. When visiting the same folders, every time they load very slow, and the CPU load jumps to 100%, which makes me think the thumbs are generated every time. CentOS hereā€¦