Photo gallery + external storage + thumbnail generation

Hello all. I am considering installing the latest version of NC on a home server. I had OC before so I understand a little how it works. I will be adding an external storage to a folder that has thousands of photos. I know with NC (even OC) I can navigate to the folder to see the pictures. I am wondering if there is a way to advance generate thumbnails of all the photos to speed it up for users later?

Thank you!

Also see the github page with occ command explanations. Of course the external storage with images must be already “owned” by some user in Nextcloud in order to pregenerate previews, after which things can be shared with the other users. I least I guess this should work. Never tried with external storage :open_mouth:.

1 Like

I have used previewgenerator on my photos stored on an external drive. It worked and now all the preview thumbs seem to display much quicker.

The only problem I had, though, is that for the 5000 or so photos which I had stored on my external storage it took an entire week to generate all the preview thumbs. (My hardware is rather old, though, so your’s might be quicker.) Apparently, each photo is transformed into several thumbs, each of a different size. The thumbs end up being saved in the /nextcloud_data/appdata.etc./preview directory (or whatever your’s is named) and takes up nearly as much disk space as the originals, in my case the originals were 53Gb, the preview directory was 51Gb.

I couldn’t figure out how to adjust the configuration directives for the preview command, so I just accepted the default thumbs. However, there may be a way to fine-tune the output to be less processor- or space-demanding. It might be worth some experimenting.

But in any case, it does work for me.

NC 12, Ubuntu 16.04

Yeah for me it’s moreless the same. If your pictures do not have very large sizes, the thumbs will consume the same, as the largest preview size is already 2k.
So far I don’t know any way to adjust this. It is to cover all possible previews, in files app list, gallery, details view and if you actually open the picture inside gallery/files app. Related topic I just fount on guthub:

The long generation time is the reason, why the app is not baked into core, nor the cron job into nextclouds cron.php. If large amounts are uploaded in short time (which is often the case => uploading/backup gallery for the first time, uploading set of holiday pictures etc.), the generation/pre-generation will consume the server for quite long times with high cpu usage.

This is already discussed in this github issue:
So far rullzer want’s to keep the addon simple and does not much changes about it. So if one uses it actively, the mentioned temporary server resource consumption and large storage+database usage after all is included :wink: .

Thanks guys! Will try previewgenerator.