Project

General

Profile

Actions

Bug #105463

open

Preview images in filelist are always in square format

Added by Felix Heller 3 days ago. Updated 3 days ago.

Status:
Accepted
Priority:
Must have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
Start date:
2024-10-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

I've uploaded an image file in the filelist of TYPO3 13.4.0. The option "Show thumbnails" is enabled. Directly after the upload, the preview image is shown with a correct aspect ratio:

<img src="/typo3/image/process?token=XXXXXXXXXX&amp;id=96667" width="64" height="19" title="typo3-header.jpg" loading="lazy" alt="">

After reloading the filelist, the preview image is shown with a square aspect ratio of 64x64:

<img src="/fileadmin/_processed_/1/9/preview_typo3-header_19635b6aa5.jpg?1729847087" width="64" height="64" title="typo3-header.jpg" loading="lazy" alt="">

In the file information dialog, the image is always shown with the correct aspect ratio.


I'm using GraphicsMagick (['GFX']['processor'] = 'GraphicsMagick') in version 1.3.42.

I've debugged the code and found out that the creation of the ImageMagick command changed between TYPO3 12.4 and 13.4.

TYPO3 12.4

'/usr/bin/gm' 'convert' -interlace 'None' -auto-orient '+profile' '*' -sample '64'x'64' 'jpg:/var/www/html/releases/current/public/fileadmin/user_upload/typo3-header.jpg[0]'

TYPO3 13.4

'/usr/bin/gm' 'convert' -interlace 'None' -auto-orient '+profile' '*' -auto-orient -sample 64x64! -sharpen 1x2 -quality 85 -colorspace 'RGB' 'jpg:/var/www/html/releases/current/public/fileadmin/user_upload/typo3-header.jpg[0]'

Using 64x64! instead of '64'x'64' for the sample argument forces GraphicsMagick to use exactly this aspect ratio, resulting in the processed square image. While the information dialog uses a configuration of '590m'x'400m' for the processed file, the filelist uses 64x64 and forces integer values. I've tried a User TSconfig like this but the values get casted to integer in the core:

options.file_list.thumbnail {
  width = 64m
  height = 64m
}


Files


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #102187: Consistently apply ImageMagick parameters when convertingClosedBenni Mack2023-10-17

Actions
Related to TYPO3 Core - Task #103351: Avoid duplicate image crop (crop-crop-scale to crop-scale)ClosedBenjamin Franzke2024-03-08

Actions
Related to TYPO3 Core - Bug #91855: Image with crop set is JPEG compressed twiceClosed2020-07-23

Actions
Actions

Also available in: Atom PDF