[TASK] Improve and fix ThumbnailController
The ThumbnailController outputs raw data of image files as a response to a file process request. This is a massive and unnecessary performance hit, when using a remote storage, as the files need to get downloaded from the remote to be then delivered by TYPO3. This is now changed to simply redirect to the file URL. Also the mime-type check for images is replaced with an isImage() call to the processed file, in order to also properly deliver thumbnails of PDF files. Also clarify in code, that ProcessedFile::CONTEXT_IMAGEPREVIEW isn't capable of handling any other processing instruction than "width" and "height". Also fix delivering an icon as thumbnail, when the processed file isn't an image. Last but not least, fix the 404 response by using a HtmlResponse instead of a plain Response object, because the plain Response object needs a resource and cannot deal with plain strings. Releases: master, 10.4, 9.5 Resolves: #91976 Change-Id: I218a8ba29ae0790be2603e8fab72f4eef1b8a47b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65279 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Jörg Bösche <typo3@joergboesche.de> Tested-by:
Helmut Hummel <typo3@helhum.io> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Jörg Bösche <typo3@joergboesche.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Helmut Hummel <typo3@helhum.io>
Showing
- typo3/sysext/backend/Classes/Controller/File/ThumbnailController.php 17 additions, 16 deletions...t/backend/Classes/Controller/File/ThumbnailController.php
- typo3/sysext/backend/Classes/ViewHelpers/ThumbnailViewHelper.php 1 addition, 1 deletion...ysext/backend/Classes/ViewHelpers/ThumbnailViewHelper.php
- typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php 8 additions, 1 deletion...t/core/Classes/Resource/Processing/LocalPreviewHelper.php
- typo3/sysext/core/Documentation/Changelog/10.0/Feature-85607-NewThumbnailViewHelperToRenderThumbnailsDeferred.rst 1 addition, 1 deletion...5607-NewThumbnailViewHelperToRenderThumbnailsDeferred.rst
- typo3/sysext/extbase/Classes/Service/ImageService.php 1 addition, 1 deletiontypo3/sysext/extbase/Classes/Service/ImageService.php
- typo3/sysext/filelist/Resources/Private/Templates/FileList/Search.html 1 addition, 1 deletion...filelist/Resources/Private/Templates/FileList/Search.html
Please register or sign in to comment