I’m using a custom image for login page.
I used a photo that I took which originally weight around 8Mo. I compressed it to less than 1Mo and uploaded it in the parameters.
However when loading the login page, it’s take a long time to show the background so I checked it and it actually loads a 11Mo file ! I tried different format, size, and compression, and it’s always the same. Moreover, the max-age of the picture in cache-control is only an hour, which means it basically has to be downloaded each time the user needs to login.
This is really infuriating and I have not found any workaround.
Do you experience the same issue ?
I am missing something ?
Maybe your browser is caching the old file. Delete the cache. If the image is small (e.g. 1 MB what is not really small) then there could not be load a different file with 11 MB which is not existing.
Maybe you like the app Splash.
Image (random): https://source.unsplash.com/featured/?nature,nature
check the size for some images, e.g. a few hundred KB.
Thanks for your reply. I already tried this on different nextcloud installations, with different images sizes and without any caching on my side and the same thing still happens. 1Mo images would still load quite quickly and offer a nice image definition.
For the test, I just downloaded a random image from unsplash which weights ~170kB and put it as a login background image.
When loaded for the first time without anycache, that image now weights more than 1MB.
There’s definitely something happening that multiplies the image’s weight by 10.
Ok. Please use the browser developer tools (Firefox F12) and there network analysis. Please post the entries of the HTTP requests of the image. I think it is not possible that a 1 MB file uses 10 MB to load.
OK I’m going to give you the element of my last test.
I downloaded this random splash image which weights 179,7 kB
Once set as login background, here’s the request with the exact same image.
and the full request headers
GET /apps/theming/image/background?v=55 HTTP/2
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0
Accept-Encoding: gzip, deflate, br
Cookie: oc_sessionPassphrase=s8kJ74qyVP7oHJKK6DFXd7kiT7aGOnLCKQ5oO0MPI%2FCQk4vdFCrtmQu0%2BGlKIMq9dxWoM7FK45V3HHEFZfq9Rd7sSUfxNpIqcpSsOr9Qwk100VcmCq9ruwU6H6xX4iW0; occ9fks3k44d=c2eed8758c4c178a6b179fbf3d647a18; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true
Just a quick notice that the problem still exists in nextcloud 25
I have the same issue, uploading a 960kb files as background.
End up with a 6.3MB file being downloaded by each client.
Is there a preferred format?
Could not find anything mentioning it in Theming — Nextcloud latest Administration Manual latest documentation
Hey ! Glad to see I’m not the only one !
Someone in a reddit thread mentioned that it is fixed in Nextcloud 26 but I could not get the opportunity to try it out yet.
Seems to be still an issue on 26
Has been corrected on 26 (following doc) and indeed does not happen anymore on 27.