-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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]: Custom login page background image size increases x7 #32779
Comments
I'll start working on an enhancement for this, I think I know what to do... |
Made a fix for this, see #32787 |
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 there, It seems my PR #32787 was not merged, so I expect the issue to persist. |
I'm on 25.0.3 and this still happens. |
Yes my PR has been shifted to version 26, so not fixed yet.
I realize now a few months later that my PR might need to be improved a
little by adding some testing, but unfortunately I'm 1) busy preparing for
my first child and 2) not a PHP-developer by trade so setting up a dev
environment is a bit of a hassle. The tests could be:
1. Integration test: Verify uploaded background images are saved
(probably/hopefully this test already exists)
2. Unit tests - for each accepted file format (webp, jpg, png,.. ?).:
1. Input 'small' image and check it is preserved as-is
2. input 'large' image and check it is resized to a 'smaller' version
…On Fri, Feb 10, 2023 at 2:01 PM brlarini ***@***.***> wrote:
I'm on 25.0.3 and this still happens.
The uploaded image is about 250 KB, 3840 x 2550 px, 72 dpi, 24 bit.
And then it grows to 2.6 MB, same resolution, same dpi, but now 32 bit
colors.
—
Reply to this email directly, view it on GitHub
<#32779 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6CPHPYRZURD6RERU6V6JDWWY3ZDANCNFSM5YJQQ5ZQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Bug description
I have a jpg image that is 151 kB on my computer. When I upload this via the admin console under Theming -> Login Image, the resulting
background
image stored in/data/appdata_***/theming/images
becomes about 1 MB.When inspecting the file it looks like
background
is a png file with the same dimensions as my jpg. The same happens when uploading a webp file.Manually replacing the file does not not work - then the server cannot find it anymore (it detects it's been modified?).
files.zip
It looks like this is the code that makes this change in the file, in function
public function updateImage(string $key, string $tmpFile)
. I've tested this by uploading an SVG file, which goes through as-is with an identical file size - this code seems to pass through SVG files.https://github.com/nextcloud/server/blob/master/apps/theming/lib/ImageManager.php#L234
Steps to reproduce
Changing the image via the console as described here works with exactly the same result.
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/theming.html#configure-theming-through-cli
Expected behavior
The file served is equal to the file uploaded, provided it's a "valid" file (OK resolution, normal image type like .jpg, .png or .webp). Do not agressively replace it with a very large png file.
Installation method
Official Docker image
Operating system
Other
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
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
Additional info
No response
The text was updated successfully, but these errors were encountered: