Feature #54031
closedEnable Integrators to suppress "width" and "height" attributes in image tags
0%
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.
Files
Updated by Markus Klein almost 11 years ago
- Status changed from New to Closed
- Complexity deleted (
no-brainer)
Closing as duplicate of #51842