Search code examples
typo3fluidtypo3-7.6.x

<f:image without width declaration creates a width-property in HTML that stays the same, even when the width of the original image changes


I create an image-object with fuild widthout width-property:

<f:image src="EXT:my_template/Resources/Public/images/image.png" />

This create the HTML-Output:

<img src="typo3conf/ext/my_template/Resources/Public/images/image.png" width="526" height="725" alt="">

Now when I change the image.png with another width (for example width=200px) it still create the same HTML-Output and the image gets zoomed.

I flushed all caches in backend, deleted cache via install-tool and deleted the typo3temp folder. Still the HTML-Output adds the old width-property.

I have to put a width in the

What can I do? Where is this cached?


Solution

  • I know this "bug". The problem is, that TYPO3 caches the width/height properties in the sys_file_metadata database table and doesn't update the data at a change. You can change it manually but this is only a workaround.