So, the problem was that when I wanted to regenerate previews, I simply erased the contents of appdata_XXX/preview. Every preview file is also stored in the DB so this alone causes problems. On one hand NC will not find the previews it thought to exist, on the other PreviewGenerator will not generate new files (as it’s thought to exist as per db).
So anyone finding this issue - if you want to clear previews, either:
- delete the preview folder contents, then run
occ files:scan-app-data
- this syncs files/db - faster/riskier: delete the contents of the DB with SQL like
delete from oc_filecache where path like 'appdata_ocpb8d7vbr73/preview/%';
More resources:
https://dev.to/powerflo/nextcloud-fix-a-missing-preview-image-3ldi