Issue Bug Closed

#105847Generation of fallback files of non-web format fileExtensions uses wrong file extension

Garvin Hicking 12/19/24, 09:03 updated 12/02/25, 14:27

Description

When converting an image to a non-suitable target format, a fallback mechanism is in place which will use a ‘gif_or_jpeg’ method to format the output:

<f:image src="fileadmin/ImageViewHelperTest.jpg" width="200" fileExtension="tif" />

The expected filename result would be “ImageViewHelperTest.jpg” but instead “ImageViewHelperTest.tif” is returned.

The file contents contain the actual JPG target format (not TIF). Depending on how a webserver is configured and file extensions are used for MIME type matching, this would lead to a broken image.

The image extension should instead use the fallback file extension.

Tests which were added with #105846 showcase this behaviour. This bug probably exists in all TYPO3 versions, but set to supported v12 for now.

Reviews 2