public const TEMP_FILE_DIMENSION = 2048;
$image = $this->previewProvider->getPreview($file, self::TEMP_FILE_DIMENSION, self::TEMP_FILE_DIMENSION);
Dimension of /tmp/oc_tmp_xD10UG-.jpg does not contain expected dimension requested 2048 ,returned dimensions 3072/4096
Dimension of /tmp/oc_tmp_F48MtH-.jpg does not contain expected dimension requested 2048 ,returned dimensions 3072/1728
The question becomes, why does getPreview give higher sized files. Is this a bug or excepted behavor?
It seems to work as aspected if you have TEMP_FILE_DIMENSION set to 1024
Same for me. In list view and grid view it loads the image in 1024 width.
Use chrome
NC 26.0.1 running in docker using linuxserver/nextcloud
Parameter x and y of request are always 500.
100 might be enough
⚠️ This issue respects the following points: ⚠️
Bug description
Dimension of /tmp/oc_tmp_xD10UG-.jpg does not contain expected dimension requested 2048 ,returned dimensions 3072/4096 Dimension of /tmp/oc_tmp_F48MtH-.jpg does not contain expected dimension requested 2048 ,returned dimensions 3072/1728
The question becomes, why does getPreview give higher sized files. Is this a bug or excepted behavor?
It seems to work as aspected if you have TEMP_FILE_DIMENSION set to 1024
Discoussed more here: https://github.com/nextcloud/recognize/pull/718
Steps to reproduce
1.Call getPreview($file, self::TEMP_FILE_DIMENSION, self::TEMP_FILE_DIMENSION);
Expected behavior
Should return a file preview that either matches or is smaller in size.
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
MariaDB
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?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response