Issue Bug Closed

#81147Thumbnail generation for non previewable file types in BE

Georg Tiefenbrunn 05/05/17, 09:53 updated 10/02/18, 10:59

Description

As a BE user I would expect TYPO3 not trying to render thumbnails of non previewable file types (txt, mp3 etc.).

This mainly affects:

FileList/FileBrowser

$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] is set to 'gif,jpg,jpeg,bmp,png,pdf,svg,ai,mp3,wav,mp4,ogg,flac,opus,webm,youtube,vimeo' in typo3/sysext/core/Configuration/DefaultConfiguration.php

Atm $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] is directly used in sysext/filelist/Classes/FileList.php, sysext/backend/Classes/Utility/BackendUtility.php and sysext/recordlist/Classes/Browser/FileBrowser.php.

So TYPO3 tries to render thumbnails for e.g. audio types (defaults: mp3, wav, ogg, flac and opus) which leads to those nasty “No imagefi
no ext!
filename” thumbnails in file list and file browser.

Edit File Metadata/IRRE

When editing file metadata TYPO3 tries to render a thumbnail for all file types (even .txt file). sysext/backend/Classes/Form/Element/FileInfoElement.php doesn’t use $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] but \TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW task.

Same happens in IRRE using headerThumbnail = 1 (e.g. FAL relation field ‘Select single files’ in CE Uploads).

I’m aware of the fact that thumbnail generation is system dependent (GM/IM) and there are ways to generate thumbnails even for office documents and mp3 files might contain an album image. But atm TYPO3 imho does not offer “special” methods for thumbnail generation for unsupported file types.

Imho the best solution would be to disable thumbnail generation for unsupported file types.
Alternatively we could prettify the “No imagefi” thumbnails whit e.g a (localized) “No preview available” thumbnail/icon).

Reviews 2