Project

General

Profile

Actions

Feature #54031

closed

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

Added by Nikolas Schmidt-Voigt almost 11 years ago. Updated almost 11 years ago.

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

setWidthHeightAttr.patch (1.25 KB) setWidthHeightAttr.patch Nikolas Schmidt-Voigt, 2013-11-28 12:57

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #51842: Allow to remove dimensions in img tagClosed2013-09-09

Actions
Actions

Also available in: Atom PDF