#105847Generation of fallback files of non-web format fileExtensions uses wrong file extension
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.