Bug #81776
closedDuplicated image thumbnails in file list, file picker and search
100%
Description
TYPO3 shows image thumbnails in file list module, search in file list module and file picker.
Unfortunately all these places generate unique thumbnail, which pollutes the sys_file_processedfile table as well as filesystem.
Dimensions of the images are the same.
File list:
responsible file:
typo3/cms/typo3/sysext/filelist/Classes/FileList.php¶
$processedFile = $fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, []) $thumbUrl = $processedFile->getPublicUrl(true); $theData[$field] .= '<br /><img src="' . $thumbUrl . '" ' . 'width="' . $processedFile->getProperty('width') . '" ' . 'height="' . $processedFile->getProperty('height') . '" ' . 'title="' . htmlspecialchars($fileName) . '" alt="" />';
generates image like /fileadmin/_processed_/0/3/preview_1_861a55d585.jpg
with empty configuration column in db, and "Image.Preview" as task_type
Search in filelist
- uses fluid template typo3/sysext/filelist/Resources/Private/Templates/FileList/Search.html
<f:image image="{file.resource}" maxWidth="64" maxHeight="43" />¶
result in file /fileadmin/_processed_/0/3/csm_1_461a7fe184.jpg
with configuration column in db like:
a:7:{s:5:"width";N;s:6:"height";N;s:8:"minWidth";N;s:9:"minHeight";N;s:8:"maxWidth";i:64;s:9:"maxHeight";i:43;s:4:"crop";N;}
task type: "Image.CropScaleMask"
file picker¶
responsible code: typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
$processedFile = $fileObject->process( ProcessedFile::CONTEXT_IMAGEPREVIEW, ['width' => 64, 'height' => 64] ); $imageUrl = $processedFile->getPublicUrl(true); $imgInfo = [ $fileObject->getProperty('width'), $fileObject->getProperty('height') ]; $clickIcon = '<img src="' . $imageUrl . '"' . ' width="' . $processedFile->getProperty('width') . '"' . ' height="' . $processedFile->getProperty('height') . '"' . ' hspace="5" vspace="5" border="1" />';
generates file like:
/fileadmin/_processed_/0/3/preview_1_dd144cea45.jpg
with configuration in db:
a:2:{s:5:"width";i:64;s:6:"height";i:64;}
"Image.Preview" as task_type
Files
Updated by Tymoteusz Motylewski over 7 years ago
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53399
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53399
Updated by Tymoteusz Motylewski over 7 years ago
- Related to Bug #75284: TBE file selector - bad performance, very slow added
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53399
Updated by Tymoteusz Motylewski over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 755e0ed02610bf14a16ecae9b12770e5412d76f4.
Updated by Gerrit Code Review over 7 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53508
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53509
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53509
Updated by Tymoteusz Motylewski over 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset ade023a020b6fa1ab7352830ab7bbd19adb5501d.
Updated by Tymoteusz Motylewski over 7 years ago
- Related to Bug #82098: Duplicated image thumbnails in file list search view added
Updated by Tymoteusz Motylewski almost 7 years ago
- Related to Bug #83242: thumbnail is regenerated every time when empty processing configuration is passed added
Updated by Helmut Hummel almost 7 years ago
- Related to Bug #83421: Fix preview processing API added