Issue Feature Closed

#54031Enable Integrators to suppress "width" and "height" attributes in image tags

Nikolas Schmidt-Voigt 11/28/13, 12:57 updated 11/28/13, 13:26

Description

There are some cases, when you do not want to render “width” and “height” attributes in image tags. This is especially true for responsive layouts. Today it is not possibly to achieve this via the IMAGE content object in TypoScript. The rendering of width and height attributes are still hard coded in TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer. To change this I propose to add a new TypoScript property to the IMAGE content object: “setWidthHeightAttr”. It would be boolean and “width” and “height” attributes are only rendered when it is “true” (which is also the default value).

Please see the attached patch for typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php for a possible solution.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.