Review main Merged

95045[TASK] Replace GD-based error thumbnails with static SVG placeholder

Benni Mack CR +2 V +2 Normal +59 −87 updated 08/01/26, 18:34

Commit message

When a preview cannot be generated (non-image file or failed
processing), LocalImageProcessor now delivers the static placeholder
EXT:core/Resources/Public/Images/PreviewNotAvailable.svg as processing
result and logs the actual reason, instead of rendering text onto a
PNG via GD.

The now unused, internal method
GifBuilder::getTemporaryImageWithText() and its base image
NotFound.png are removed.

The affected "Image.Preview" task type is hardly used in Core anymore,
as most thumbnail rendering has been migrated to "Image.CropScaleMask".
It is currently only used in the workspaces module grid, in the AJAX
response of the backend FileController after file uploads, for poster
images of online media files, and as the default context of the
backend ThumbnailViewHelper.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Sascha Nowak +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 1722

  1. Benni Mack uploaded patch set 1 08/01/26, 06:02

  2. Benni Mack uploaded patch set 2 08/01/26, 06:06

  3. core-ci voted on patch set 1 V +1 08/01/26, 06:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105777

  4. core-ci voted on patch set 2 V +1 08/01/26, 06:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105778

  5. Benni Mack uploaded patch set 3 V +1 08/01/26, 07:02

  6. Benni Mack uploaded patch set 4 08/01/26, 07:08

  7. Benni Mack marked it ready for review 08/01/26, 07:08

  8. core-ci voted on patch set 3 V -1 08/01/26, 07:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105781

  9. core-ci voted on patch set 4 V -1 08/01/26, 07:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105782

  10. Benni Mack uploaded patch set 5 V -1 08/01/26, 07:40

  11. core-ci voted on patch set 5 V +1 08/01/26, 07:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105783

  12. Sascha Nowak voted on patch set 5 CR +1 08/01/26, 07:58

  13. Simon Schaufelberger commented on patch set 5 CR -1 V -1 08/01/26, 08:43

    Temporary -1 to check video files
  14. Benni Mack commented on patch set 5 08/01/26, 11:24

    Reply

    local or remote videos (= online media)?
  15. Simon Schaufelberger commented on patch set 5 08/01/26, 13:11

    Reply

    local mp4 videos. youtube videos should render the youtube thumbnail anyway.
  16. Simon Schaufelberger commented on patch set 5 08/01/26, 13:38

    Reply

    Oh, I just realize that I need to install php8.5 first but it seams that my OS is too old that I can't even install PHP8.5 (Ubuntu 20) 😞
  17. Simon Schaufelberger commented on patch set 5 08/01/26, 15:12

    Reply

    Is this the expected result? https://forge.typo3.org/issues/110350#note-7 I'm not sure how to test it properly. At least with the video file I see in the list view a nice image but in the tile view a broken image
  18. Benni Mack commented on patch set 5 08/01/26, 15:48

    Reply

    this is the result with the FileList "hack" applied. Otherwise there are no changes to the File List view in general.
  19. Simon Schaufelberger commented on patch set 5 CR +1 V +1 08/01/26, 15:58

    Reply

    Ok, would it make sense to fix the issue with video files with this patch as well or rather in a separate patch?
  20. Benni Mack commented on patch set 5 08/01/26, 16:53

    Reply

    Thanks for testing, Simon! What you found is a separate, pre-existing issue — it looks the same on main without this patch. I did check this as well. Background: the tile view renders thumbnails via f:image (Image.CropScaleMask context), not via the Image.Preview context. For a local mp4, image processing bails out and FAL falls back to setUsesOriginalFile(), so the tile literally renders <img src="fileadmin/….mp4"> — hence the broken image. The list view (with the "how to test" hack) goes through Image.Preview, which now delivers the SVG placeholder, that's why it looks fine there. So: separate patch. I can see what I can come up with but that would go into 14.3 as well. Related long-standing request for real video thumbnails: https://forge.typo3.org/issues/90623
  21. Stefan Bürk voted on patch set 5 CR +2 V +2 08/01/26, 18:34

  22. Stefan Bürk merged patch set 6 08/01/26, 18:34