Fallback generation fails if the file's extension is uppercased

Created on 28 March 2025, 8 days ago

Problem/Motivation

If a file has an uppercase extension ( e.g. : cat-picture.JPG ) the module will not generate a fallback because it fails to match the Drupal\wpf\ImageFactoryInterface::JPG_PATTERN regex.

Steps to reproduce

1. Upload an image with an uppercase extension.
2. Try to open the fallback.

Expected behavior: display the jpg fallback.
Actual behavior: not found error.

Proposed resolution

Simply need to add an /i option to the regex pattern.

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇧🇷Brazil adinancenci

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024