Review 12.4 Merged

81146[BUGFIX] Ensure scaled width and height are used with `noScale=1`

Stefan Bürk CR +2 V +2 Easy +23 −0 updated 09/21/23, 11:54

Commit message

If imgResource option `noScale = 1` [1] is configured,
the image itself is not scaled. However, the calculated
scaled width and height values needs to be used for the
`img` tag attributes `width` and `height`.

In that case, the orginal image is used instead of a
processed image, and the calculated values are discarded.

This change recalculates these values if `noScale = 1` is
requested to ensure that the scaled width and height values
are used correctly.

Example
-------

page.100 = IMAGE
page.100 {
  file = fileadmin/styleguide/bus_lane.jpg
  file.noScale = 1
  file.width = 240m
  file.height = 240m
  wrap = |<br>
}

[1] https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Imgresource.html#noscale

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 46

  1. Stefan Bürk commented on patch set 1 09/21/23, 10:48

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 09/21/23, 11:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47004

  3. Stefan Bürk uploaded patch set 2 V -1 09/21/23, 11:15

  4. core-ci voted on patch set 2 V +1 09/21/23, 11:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47007

  5. Stefan Bürk voted on patch set 2 V +2 CR +2 09/21/23, 11:54

  6. Stefan Bürk merged patch set 3 09/21/23, 11:54