#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 <span data-processor="relativetime" data-value="2026-10-12T12:17:55+00:00" > 10/12/26, 12:17 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96634 <span data-processor="relativetime" data-value="2026-10-12T18:24:43+00:00" > 10/12/26, 18:24 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 96635 <span data-processor="relativetime" data-value="2026-10-12T18:24:50+00:00" > 10/12/26, 18:24 </span>
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-12T18:30:10+00:00" > 10/12/26, 18:30 </span> -
Gerrit Code Review pushed patch set 2 for 13.4 to change 96635 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2026-10-12T19:13:12+00:00" > 10/12/26, 19:13 </span> -
Anonymous commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2026-10-12T19:25:14+00:00" > 10/12/26, 19:25 </span>Applied in changeset commit:9adfce8d1acf381406a404dd498363b9d0c143a9.
Applied in changeset commit:3ac01025676fe12c2572aaa9eba67c5373e12ac9.