#111028GraphicalFunctions::resize() ignores original file for uppercase extensions
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:
- 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. - With the target extension
web, thein_array()check against the list of web image extensions fails forPNG/@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
-
Gerrit Code Review pushed patch set 1 for main to change 96631 status
NewUnder Review 10/12/26, 12:17 -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96634 10/12/26, 18:24
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 96635 10/12/26, 18:24
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 10/12/26, 18:30 -
Gerrit Code Review pushed patch set 2 for 13.4 to change 96635 status
ResolvedUnder Review 10/12/26, 19:13 -
Anonymous commented and changed status
Under ReviewResolved 10/12/26, 19:25Applied in changeset commit:9adfce8d1acf381406a404dd498363b9d0c143a9.
Applied in changeset commit:3ac01025676fe12c2572aaa9eba67c5373e12ac9.