Cannot see previews of my photos in the web browser

Still the same problem in Firefox 120.

Suddenly it works :grinning:
Firefox 120.0
Nextcloud 27.1.4
I guess it was fixed recently in Nextcloud because the Firefox version hasn’t changed.

Have you looked into DuckDNS? Its free and works fine. SSL/TLS is pretty much standard by now, I wouldn’t run it without.

You need to add the previewgenerator app for nextcloud.

Check if the previewgenerator app is installed:

The command preview:generate-all is part of the Preview Generator app in Nextcloud.

You can check if the app is enabled and installed by running the following command:

php occ app:list

Look for previewgenerator in the output list. If it’s not enabled, you can install it by running:

php occ app:enable previewgenerator

If the app isn’t installed, you can install it via the Nextcloud app store, or by running:

php occ app:install previewgenerator

if errors out while generating preview then you have to do below:

Install ClamAV: You need to install ClamAV, which is required for the antivirus scanning functionality. Run the following commands to install it:

apt update
apt install clamav clamav-daemon

Verify ClamAV Installation: After installation, verify that the clamscan executable is available at /usr/bin/clamscan:

which clamscan

Update Antivirus Configuration: If the path to clamscan is different, update the configuration of the Nextcloud antivirus app to point to the correct path.

Re-run the Preview Generation Command: Once ClamAV is installed and configured correctly, retry generating previews:

php occ preview:generate-all -vvv

2 Likes

I also had issues with the previews. Some previews were shown and others not shown in the mobile app.
For other accounts of the instance it worked fine.

The solution was to replace the whole preview folder with a fresh and empty one.

This is the way to do it: https://help.nextcloud.com/t/how-to-clean-up-nextcloud-data-appdata-and-updater/123746/7

I recommend to set the preview size to a smaller value since the preview folder can become quite big otherwise.
Example:
‘preview_max_x’ => 1080,
‘preview_max_y’ => 1920,

Preview generation is now working really fine and fast on the fly with no more issues.
You can kind of observe the first generations when the folders 0 - f are created in the preview folder.

The size with first previews generated now (no automatic generation by job, only scrolling a bit in the app and browser):
33M preview/
Before (autmoatic preview generation by cron job was active):
21G preview_old/

One might say 21G is not too much - but it took about 15 mins to only do a du -hs on the folder. Just thinking on backup and stuff…
I therefore decided to not generate previews in a job any more.

For performance reaons I also tried to move only the preview folder to a SSD and point to it via symlink. This did’t work!
Preview generation just stopped. In the log: “30.0.4.1”,“exception”:{“Exception”:“OCP\Files\ForbiddenException”,“Message”:“Following symlinks is not allowed”.

You need to

occ files:scan --all

before

Hi Sanook,

I did. I guess it didn’t help since the preview data in the preview folders was somehow corrup. The instance is old and had many updates.
Now I unfortunately can not test it again since the old preview folder is gone.

Anyways: if **occ files:scan --all** gives no good result a complete folder change like mentioned above repairs it easily.

For anyone with this problem:

In my case I had to compile PHP with +jpeg and +png support to show the previews.

No config changes in nextcloud required as previews are mostly the default.