Preview generator image size issue

Hello All.

I have been trying to configure preview generator on my RPI 4.
The first time i installed and ran preview generator app, it created fine previews. A bit too large in storage size however thumbnails were fitting well. After a few tweaks and changing the image sizes, the thumbnails are not fitting properly. Example is attached.

I used these settings and I can not seem to revert these settings at all:

occ config:app:set previewgenerator squareSizes --value="32 256"
occ config:app:set previewgenerator widthSizes --value="256 384"
occ config:app:set previewgenerator heightSizes --value="256"
occ config:system:set preview_max_x --value 2048
occ config:system:set preview_max_y --value 2048
occ config:system:set jpeg_quality --value 60
occ config:app:set preview jpeg_quality --value="60"

The Preview generator app generates previews of all sizes by default. I want that default setting again and re-generate previews so that i can have better thumbnails this time. Can someone please help me figure out how to revert these changes in preview generator and let it generate default sizes?

Thanks!

Have you tried to use occ config:app:delete ... to delete the custom set parameters? Ususally an app should use default values if no custom ones have been set.

When using:

sudo -u www-data php /var/www/nextcloud/occ config:app:delete previewgenerator squareSizes --value=“32 256”

I get this output:

The –value option does not exist.

Seems like delete option does not exist.

Tried this command and it worked:

sudo -u www-data php /var/www/nextcloud/occ config:app:delete previewgenerator squareSizes

Now what do I need to do in order to remove old previews and generate new ones with default sizes?

Yes that’s an expected result, if you don’t use the correct command syntax.

> ./occ config:app:delete --help
Description:
  Delete an app config value

Usage:
  config:app:delete [options] [--] <app> <name>

Arguments:
  app                        Name of the app
  name                       Name of the config to delete
...

Tried this command and it worked:

sudo -u www-data php /var/www/nextcloud/occ config:app:delete previewgenerator squareSizes

Now what do I need to do in order to remove old previews and generate new ones with default sizes?

What about deleting the content of the preview folder ([nc-data-directory]/appdata_xyz/preview) and re-running the preview generating command.

I tried it several times. Since I have data of around 50 GB, I re-run the preview generating command for about a minute or so and check the files it has created. I get the same output everytime.
However, now after I ran the occ config:app:delete command that you suggested, I hope for expected results. Will update you if its fixed now. Thank you!

No. All the rectangle (landscape) images appear double or triple in the thumbnails. Please let me know how to fix it. :weary:

You wanted to revert all settings to the default, so that’s now the desired result. If it doesn’t match your expectations you have to set custom values.