Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview generation and pre-generation of only images in a specific folder #410

Closed
ostasevych opened this issue Jul 29, 2023 · 3 comments
Closed
Labels
docs Documentation matters

Comments

@ostasevych
Copy link

ostasevych commented Jul 29, 2023

Hi! I have a need to create the thumbnails only for image files (png/jpeg/gif/bmp/tiff) in a specific folder.
I have installed Imaginary in docker to make the preview generation easier (localhost @ port 9000).
I use OnlyOffice in docker.

My config.php file includes the following preview generation settings:

'enable_previews' => true,
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'enabledPreviewProviders' =>
array (
  0 => 'OC\\Preview\\Image',
  1 => 'OC\\Preview\\TIFF',
  2 => 'OC\\Preview\\Imaginary',
),
'jpeg_quality' => '60',
'preview_concurrency_new' => '1',
'preview_imaginary_url' => 'http://localhost:9000',

When I try to apply the initial generation ./occ preview:generate-all it creates thumbnails for office and pdf files, what I do NOT want the thumbnails are created. How to forbid explicitly generation of previews/thumbnails for office files?

When opening a folder nextcloud through Imaginary generates the thumbnails, what I do not want to have, but only for image files.

There's no documented way to generate and pre-generate settings to create thumbnails/previews ONLY for specific folders, but not the rest. The other method of placing .nomedia file where they are not needed is useless, as I have to place it everywhere in fact.

Please, suggest what to do to achieve my goals. Thanks!

@joshtrichards
Copy link
Member

I use OnlyOffice in docker.

The previews are coming form OnlyOffice. I believe OO has an independent option to disable preview generation for document formats it is handling - i.e.

https://github.com/ONLYOFFICE/onlyoffice-nextcloud/blob/ec8d49ac58ebf64f6cae2617742f9503400cd43e/templates/settings.php#L110

@joshtrichards joshtrichards closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2024
@ostasevych
Copy link
Author

I use OnlyOffice in docker.

The previews are coming form OnlyOffice. I believe OO has an independent option to disable preview generation for document formats it is handling - i.e.

https://github.com/ONLYOFFICE/onlyoffice-nextcloud/blob/ec8d49ac58ebf64f6cae2617742f9503400cd43e/templates/settings.php#L110

This is not related to OO.

@joshtrichards
Copy link
Member

joshtrichards commented Mar 30, 2024

This is not related to OO.

Can you elaborate?

This is OnlyOffice's Preview provider: https://github.com/ONLYOFFICE/onlyoffice-nextcloud/blob/master/lib/Preview.php

It registers itself to provide preview generation capabilities for the following formats:

https://github.com/ONLYOFFICE/onlyoffice-nextcloud/blob/ec8d49ac58ebf64f6cae2617742f9503400cd43e/lib/Preview.php#L120-L151

These can only be disabled by toggling off previews in the OO Nextcloud app.

@joshtrichards joshtrichards added the docs Documentation matters label Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation matters
Projects
None yet
Development

No branches or pull requests

2 participants