Issue Bug Resolved

#111028GraphicalFunctions::resize() ignores original file for uppercase extensions

Alexander Schnitzler 10/12/26, 12:13 updated 10/12/26, 19:25

Description

GraphicalFunctions::resize() compares the extension of the source image case-sensitively. For files with an uppercase extension (e.g. photo.PNG, IMG_1234.JPG) this has two effects:

  1. The “nothing to do” shortcut never applies: the target extension is normalised to lowercase (png), the original extension is not (PNG), so the check fails even if neither the dimensions nor the format change. ImageMagick/GraphicsMagick then creates a processed copy of the image that is identical to the original.
  2. With the target extension web, the in_array() check against the list of web image extensions fails for PNG/@JPG@. The image is then treated as a non-web format and converted via the fallback.

Steps to reproduce

  • Upload an image with an uppercase extension, e.g. test.PNG
  • Render it at its original dimensions without cropping or other parameters (e.g. <f:image> without width/height)
  • A processed file is created in _processed_ instead of the original file being used. With a lowercase extension, the original is used.

Expected behaviour

The extension comparison is case-insensitive, so test.PNG behaves exactly like test.png.

Reviews 3

History 26

  1. Anonymous commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-12T18:30:10+00:00" > 10/12/26, 18:30 </span>

    Applied in changeset commit:3ac01025676fe12c2572aaa9eba67c5373e12ac9.

  2. Gerrit Code Review pushed patch set 2 for 13.4 to change 96635 status Resolved Under Review <span data-processor="relativetime" data-value="2026-10-12T19:13:12+00:00" > 10/12/26, 19:13 </span>

  3. Anonymous commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-10-12T19:25:14+00:00" > 10/12/26, 19:25 </span>

    Applied in changeset commit:9adfce8d1acf381406a404dd498363b9d0c143a9.