Bug #100972
closedimgResource.noScale + width/height doesn't work as documented
100%
Description
The reference for imgResource (up to the latest version) gives a simple example for the noScale
option:
file = fileadmin/test.jpg
file.width = 240m
file.height = 240m
file.noScale = 1
The result should be:
<img src="fileadmin/test.jpg" width="240" height="180" />
But at least up to V11 (haven't yet tested newer versions) this is not the case. The width and height attributes are set with the actual dimensions of the image. This seems basically the same problem as described almost a decade ago in #54533. I can't say whether this is still the same problem, but the result still is.
Something needs to be fixed here, either the documentation or the actual behaviour of noScale. It's highly frustrating, if you try to use a feature exactly as documented, but it simply doesn't work. There are workarounds (eg. with layout.default.element
as mentioned in #54533) and maybe this is really hard to fix - but then the documentation shouldn't say so + ought to be updated.
Updated by Gerrit Code Review 11 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81130
Updated by Gerrit Code Review 11 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81130
Updated by Gerrit Code Review 11 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81130
Updated by Gerrit Code Review 11 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81130
Updated by Gerrit Code Review 11 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81146
Updated by Gerrit Code Review 11 months ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81146
Updated by Stefan Bürk 11 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset eba0ea7ecd4edaa73da823ecf4ce7f4f703cd23f.