-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Bug]: Preview generation for square image sizes between 257 and 512 are rounded up to 1024 #34244
Comments
So apparently 512x512 is not supposed to be generated, crazy. This is a lot of wasted space and bandwidth to use a 1024x1024 image for thumbnails. |
Reopened due to this actually not being resolved but simply as known. I only have about 5 users actively using my NC setup to store photos so I can't even imagine someone in a much larger environment. I personally have over 300GB of photos/videos. To reiterate what was in the above referenced posting, my browser (which is on a Windows PC at 3840x2160 resolution, 200% scale, and browser zoom of 100%, requests 500x500, which is overkill as is. The server generates a 1024x1024 image as a result.
A quick look at the thumbnails shows about a 6-10X size increase for 1024x1024 thumbs versus 256x256. This translates into a lot more bandwidth and a lot more storage space So this begs the question of why it's necessary to generate 1024x1024 for thumbnail images? I'm genuinely interested in knowing who has a display setup that would actually benefit from that large of a thumbnail image. |
Please note that AFAIK images are not only used as (small) thumbnails, but also for when you click on the image to open it, like in Photos app, or even on Files apps. This can help too: https://github.com/nextcloud/server/blob/master/config/config.sample.php#L1115-L1129 |
Hi, thank you. Yes, I know, but the image generated for when you click on the image to view it is a different image request at a different size too. Mine is capped at 1920 for X and Y already via the config.php |
I experienced the same, trying to only pregenerate the thumbnails, expecting the files app to just need 64x64, it actually requested much larger previews. Im not even close to generating all preview files and my preview folder is already 15GB. Plus the bandwith... |
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you! My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort! If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+ |
Hi, just saw this, sorry, will check tonight and get updated info! |
So unfortunately the bug still exists in NC 25.0.4. This is the URL being tested: Which results in an image size of 1024x768 being generated. |
I've been fighting this for a while on different versions over the years. At this point I'm just trying to find a way to generate the grid resolutions ahead of time. Not a fan of the size for mobile, but I can deal with it. Thinking if I set the 2048 to 1024 then the server would have the correct 1024 needed for the grid view?? currently using |
So as of NC 26, this is still occurring. That is, a request for square size x=257 y=257 still generates 1024x1024 instead of the higher and nearest power of 2 of 512x512. |
Consider this closed. Apparently in NC versions 25 and up, previews are only generated for sizes 64, 256, 1024, and 4096. I'm not even sure if you can generate anything over 4,096 anymore or if that is a hard limit... But there you go, powers of 4, not powers of 2. |
Bug description
The file listing one (via web interface) for example, uses a base thumbnail size of 250x250 and is then multiplied by the device's pixel ratio. The server translates it to a the nearest higher power of 2 value. So 250x250 becomes 256x256. This functions correctly, but the moment it goes above 256x256 (257x257, 258x258) the image generated becomes 1024x1024.
https://MYSERVER/core/preview?fileId=1703032&c=7b93d6eab1427002553cfb81c329adb0&x=257&y=257&forceIcon=0&a=0
This strikes me as incorrect because 512x512 is a power of 2 and should be the correct one utilized.
Steps to reproduce
Expected behavior
Requested square images of sizes 257x257 through 512x512 should have a 512x512 image returned instead of 1024x1024.
Installation method
Other Community project
Operating system
Other
PHP engine version
PHP 7.4
Web server
Nginx
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: