Project

General

Profile

Actions

Bug #100972

closed

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

Added by Michael Stopp 11 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 #1

Updated by Michael Stopp 11 months ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review 8 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

Actions #3

Updated by Gerrit Code Review 8 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

Actions #4

Updated by Gerrit Code Review 8 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

Actions #5

Updated by Gerrit Code Review 8 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

Actions #6

Updated by Gerrit Code Review 8 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

Actions #7

Updated by Gerrit Code Review 8 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

Actions #8

Updated by Stefan Bürk 8 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF