Project

General

Profile

Actions

Bug #100972

closed

imgResource.noScale + width/height doesn't work as documented

Added by Michael Stopp 12 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2023-06-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF