Search code examples
htmlcontent-management-systemtypo3responsive-designtyposcript

Remove attributes "height" and "width" of the image tag


In order to create a responsive website with Typo3 and Twitter Bootstrap, I would like to remove the height and width attributs of images

Here's how images are generated in Frontend via content element of type text & image and image

<img src="typo3temp/pics/a625b79f89.jpg" width="300" height="226" alt="blabla" />

I would like to remove the dimension attributes and get this:

<img src="typo3temp/pics/a625b79f89.jpg" alt="blaba" />

Can anyone help me ?


Solution

  • It's not possible to remove the height or width image attributes with typoscript.

    But you could override it with CSS in order to create a responsive website.

    img { height:100% !important; width:100% !important; }