STEPS TO REPRODUCE 1. run GTK_DESKTOP_PORTAL=1 firefox, attempt to upload a file 2. browse to an image folder, activate icons view with "show preview" activated, wait until thumbnails are generated and scroll OBSERVED RESULT - On the first run all icons are their jpg/png/whatever placeholders, as expected, with CPU and disk load while thumbnails are presumably generated - after there is no more cpu/disk activity, scrolling presents you with a mixed bag of placeholder pictures and thumbnails. mouseover a placeholder immediately shows the thumbnail. Switching previews on or off a few times may or may not redraw every tile as thumbnail. EXPECTED RESULT - show thumbnails for tiles after they have been generated, without needing to mouseover. In Dolphin it works as expected, only the file upload dialog is affected. SOFTWARE/OS VERSIONS XUbuntu 22.04.01 LTS This also happens when running the plasma desktop.
Can reproduce.
Additional Info: It seems like when entering the image directory after the first run of thumbnail generation (disk and CPU activity) there is a single-thread CPU spike with no disk activity. If you wait that out (~15 seconds or so for a ~1000 image directory on a fairly modern CPU) without touching any controls and only scroll then, most thumbnails are there. It can happen though that existing thumbnails revert back to the placeholder image. As for the importance of the bug (Major impact): Thumbnail images in the file picker are the one killer feature why one would use the KDE portal over the default (GTK) one. It is really important that this works flawlessly.
Since this has been pinpointed to "kio", my versions are: kio, libkf5kio*, ... : 5.92.0-0ubuntu1 kio-extras: 4:21.12.3-0ubuntu1
Problem persists with Ubuntu 22.10 kio, libkf5kio*, ... : 5.98.0-0ubuntu1 kio-extras: 4:22.08.2-0ubuntu1
Problem persists with Ubuntu 23.04 kio, libkf5kio*, ... : 5.104.0-0ubuntu1 kio-extras: 4:22.12.3-0ubuntu2
Updated Situation on Ubuntu 23.10: Now, after waiting for all the thumbnails to be created when first entering a directory, they seem to stick. Even when entering the directory later again and waiting a second, you can see all the thumbnails (if you wait less before scrolling, some are missing again). It seems to me like the original bug still persists, but some parameters were tuned, like how many thumbnails are kept in cache. It is certainly more usable like this, but I would still keep the bug report open until it works as reliable as in the file browser (not file picker). kio, libkf5kio*, ... : 5.110.0-0ubuntu1 kio-extras: 4:23.08.1-0ubuntu1