Actions
Feature #54031
closedEnable Integrators to suppress "width" and "height" attributes in image tags
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2013-11-28
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
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
Actions