3

I am having an issue with the image viewhelper through the DCE extension on typo3 6.2.

<f:image src="{field.picture}" alt="" width="400" maxHeight="300c" />

This is supposed to resize the image to 400px width and then crop the height to 300px according to the official documentation at https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Image.html

However what happens is that the image is referenced through the real path (/fileadmin/some_folder/image.jpg) instead of a cached / processed / cropped file (fileadmin/_processed_/csm_more_garden_crop_e3ced4a9bb.jpg). So there is no cropping at all.

How to reproduce:

install the dce extension, create a custom content element from the DCE menu, add a picture field and set the config to:

<config>
    <type>group</type>
    <internal_type>file</internal_type>
    <allowed>jpg,jpeg,png,gif</allowed>
    <size>0</size>
    <minitems>0</minitems>
    <maxitems>1</maxitems>
    <show_thumbs>0</show_thumbs>
</config>

then display the image in the template as

<f:image src="{field.picture}" alt="" width="400c" maxHeight="300" />

PS: There is an existing bug that might related to this however it's not being fixed and it's unclear whether this is the real cause: https://forge.typo3.org/issues/19045 (SO: Typo3 Fluid Image crop of with and height failure with no accepted solution)

Community
  • 1
  • 1
Mario
  • 2,619
  • 1
  • 24
  • 22

0 Answers0