Review main Merged

90118[BUGFIX] Offload decorative thumbnail generation in file list

Andreas Kienast CR +2 V +2 Normal +198 −20 updated 07/28/25, 12:59

Commit message

The file list currently generates a thumbnail for each "thumbnailable"
asset, used for drag&drop only in its current state. Many assets get
generated while they are not directly visible to the user, leading to
an additional overhead in IO, which drastically adds up on remote
storages.

To avoid premature generation of such assets, the generation is
offloaded to a PHP endpoint called on-demand when the new web
component `typo3-backend-thumbnail` is rendered in DOM.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • Markus Klein +1
    • Garvin Hicking +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Georg Ringer +1
    • Markus Klein +1
    • Garvin Hicking +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 3038

Show 813 earlier messages
  1. Andreas Kienast uploaded patch set 1 07/22/25, 09:41

  2. Andreas Kienast uploaded patch set 2 07/22/25, 09:47

  3. core-ci voted on patch set 1 V -1 07/22/25, 09:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82115

  4. core-ci voted on patch set 2 V -1 07/22/25, 09:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82116

  5. Andreas Kienast uploaded patch set 3 V -1 07/22/25, 10:54

  6. Andreas Kienast commented on patch set 3 07/22/25, 10:58

    file-list-dragdrop.ts:105

    This is a left-over and not required anymore…
  7. core-ci voted on patch set 3 V +1 07/22/25, 11:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82118

  8. Andreas Kienast uploaded patch set 4 V +1 07/22/25, 11:06

  9. Andreas Kienast commented on patch set 4 07/22/25, 11:07

    file-list-dragdrop.ts:105 Reply

    Done
  10. core-ci voted on patch set 4 V +1 07/22/25, 11:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82119

  11. Andreas Kienast uploaded patch set 5 V +1 07/22/25, 12:51

  12. core-ci voted on patch set 5 V +1 07/22/25, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82126

  13. Andreas Kienast uploaded patch set 6 V +1 07/22/25, 13:51

  1. core-ci voted on patch set 6 V +1 07/22/25, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82130

  2. Andreas Kienast uploaded patch set 7 V +1 07/22/25, 14:03

  3. core-ci voted on patch set 7 V +1 07/22/25, 14:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82131

  4. Markus Klein voted on patch set 7 CR +1 07/24/25, 12:34

  5. Markus Klein commented on patch set 7 07/24/25, 12:37

    ResourceController.php:60

    false

    ResourceController.php:64

    do we need any access checks here?
  6. Markus Klein commented on patch set 7 CR 0 V -1 07/24/25, 12:38

  7. Andreas Kienast commented on patch set 7 07/24/25, 12:49

    ResourceController.php:60 Reply

    Acknowledged

    ResourceController.php:64 Reply

    I think we can check for read permissions. I don't see any other necessary access check here.
  8. Andreas Kienast commented on patch set 7 07/24/25, 12:52

    Reply

    This is fine, as this is the "base URL" used for further processing.
  9. Andreas Kienast commented on patch set 7 07/24/25, 12:53

    Reply

    See the changes in FileList.php.
  10. Andreas Kienast uploaded patch set 8 V +1 07/24/25, 13:06

  11. Andreas Kienast commented on patch set 8 07/24/25, 13:06

    ResourceController.php:64 Reply

    Done
  12. core-ci voted on patch set 8 V +1 07/24/25, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82242

  13. Markus Klein commented on patch set 8 CR +1 07/24/25, 13:48

    Reply

    Right, I overlooked that you introduce this as public property. Thx.
    will test the v12 backport on a production instance then
  14. Markus Klein voted on patch set 8 V +1 07/25/25, 08:48

  15. Simon Schaufelberger commented on patch set 8 07/25/25, 09:57

    When I start dragging an image, I see 2 requests in the network tab. One request-thumbnail and another with process. Both return a status code of 302 which is a bit strange. Why are 2 requests necessary and why the 302 status code?
  16. Simon Schaufelberger commented on patch set 8 07/25/25, 10:01

    Reply

    When I drag the same image again, it takes quite a while for the same thumbnail to appear again. Can't this image (path) also be cached in the browser?
  17. Andreas Kienast commented on patch set 8 07/25/25, 10:25

    Reply

    There are two requests if the requested thumbnail image does not exist. The controller pings the processing component, that returns two different URLs: * if the image exists: the path to the file * if the image does not exist: another URL to an internal controller handling the processing, which will render the image and return the blob _somewhen_ This architecture is not great, but not solvable right now. Caching responses would be great, but doesn't work as there is a central middleware that overrides all `Cache-Control` (and related) headers.
  18. Simon Schaufelberger commented on patch set 8 07/25/25, 13:55

    Reply

    I'm not sure how it is done with the icons but once they are loaded, the second time the icon is used, it is loaded extremely fast.
  19. Andreas Kienast commented on patch set 8 07/25/25, 13:59

    Reply

    The icons are stored in the browser's localStorage.
  20. Simon Schaufelberger commented on patch set 8 07/25/25, 23:05

    Reply

    ok but that's not practical here. ACK
  21. Simon Schaufelberger voted on patch set 8 CR +1 V +1 07/25/25, 23:05

  22. Garvin Hicking voted on patch set 8 CR +1 V +1 07/26/25, 05:42

  23. Georg Ringer voted on patch set 8 CR +1 V +1 07/27/25, 18:09

  24. Andreas Kienast voted on patch set 8 CR +2 V +2 07/28/25, 12:59

  25. Andreas Kienast merged patch set 9 07/28/25, 12:59