Review main Merged

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

Stefan Bürk CR +2 V +2 Easy +21 −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
    • Oli Bartsch +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 810

  1. Stefan Bürk uploaded patch set 1 09/21/23, 08:08

  2. Stefan Bürk updated the commit message in patch set 2 09/21/23, 08:09

  3. Stefan Bürk updated the commit message in patch set 3 09/21/23, 08:11

  4. core-ci voted on patch set 3 V +1 09/21/23, 08:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46979

  5. Benni Mack uploaded patch set 4 V +1 09/21/23, 09:51

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

  7. Benni Mack voted on patch set 4 V +1 CR +1 09/21/23, 10:07

  8. Oli Bartsch voted on patch set 4 V +1 CR +1 09/21/23, 10:45

  9. Stefan Bürk voted on patch set 4 V +2 CR +2 09/21/23, 10:48

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