If you happen to run a self-hosted Nextcloud instance for several years, and happen to watch or share a lot of photos through its web application, you might benefit from this tip:
Have a look at the size of folder data/appdata_<random-part>/preview. On my instance, it had grown larger than an single user’s whole files. The solution, as posted by user Rulizer on Github back in 2018, is to purge the image preview cache:
- Delete folder preview in data/appdata
occ files:scan-app-data
Step 2 might take some time to complete (it took about 10 minutes in my case). The only downside is that now all image previews need to be regenerated once.