-
Notifications
You must be signed in to change notification settings - Fork 57
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
It seems that when a preview generation is triggered, e.g., using the preview generator app, regardless of the given specification, the generatePreviews method always generates the maxPreview with resolution using the max possible, according to the preview_max_x and preview_max_y parameters.
This is definitely undesirable, as it defeats the whole point of having small pre-generated previews, while having large on-demand previews, when needed. In fact, in the current state, the max preview is going to take the same space as the original picture in most cases, and thus, it does not make sense to pre-generate it.
The affected line of code is here.
In particular, the function getMaxPreview will generate the max preview, if it is not found, but this should not happen, if the specification parameter does not require this preview to be generated.
Steps to reproduce
- Trigger preview generation with the preview generator app specifying only, e.g., 64 256 as sizes
- Look for previews in the data/app_xxx/preview/ folder and see they are generated at max resolution, regardless of the 64 256 specification
Expected behavior
Only previews of the specified size are generated, while other previews of larger size (up to the max specified in the config) are only generated on-demand.
And before anyone tries to say this, no, reducing the value of the preview_max_x/y parameters is not a solution as this will also force the on-demand generation of previews to be capped at that value, which is also undesirable, as this will make fullscreen pictures in the Photo app to be rendered at a low resolution, while in this case, it is desirable to get a preview at the maximum resolution possible: either the one specified in the preview_max_x/y parameter, or if they are not set, the closest to the screen resolution.
Nextcloud Server version
30
Operating system
Other
PHP engine version
PHP 8.3
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response