Project

General

Profile

Actions

Bug #81776

closed

Duplicated image thumbnails in file list, file picker and search

Added by Tymoteusz Motylewski almost 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-07-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

sys_file_processedfile.png (63.4 KB) sys_file_processedfile.png Tymoteusz Motylewski, 2017-07-03 23:51

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #75284: TBE file selector - bad performance, very slowClosed2016-03-28

Actions
Related to TYPO3 Core - Bug #82098: Duplicated image thumbnails in file list search viewClosed2017-08-14

Actions
Related to TYPO3 Core - Bug #83242: thumbnail is regenerated every time when empty processing configuration is passedClosedTymoteusz Motylewski2017-12-06

Actions
Related to TYPO3 Core - Bug #83421: Fix preview processing APIClosed2017-12-24

Actions
Actions #2

Updated by Gerrit Code Review almost 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

Actions #3

Updated by Gerrit Code Review almost 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

Actions #4

Updated by Tymoteusz Motylewski almost 7 years ago

  • Related to Bug #75284: TBE file selector - bad performance, very slow added
Actions #5

Updated by Gerrit Code Review almost 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

Actions #6

Updated by Tymoteusz Motylewski almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Tymoteusz Motylewski almost 7 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Tymoteusz Motylewski over 6 years ago

  • Related to Bug #82098: Duplicated image thumbnails in file list search view added
Actions #12

Updated by Tymoteusz Motylewski over 6 years ago

  • Related to Bug #83242: thumbnail is regenerated every time when empty processing configuration is passed added
Actions #13

Updated by Helmut Hummel over 6 years ago

  • Related to Bug #83421: Fix preview processing API added
Actions #14

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF