Problem/Motivation

If a file has an uppercase extension ( e.g. : cat-picture.JPG / cat-picture.WEBP ) 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.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
#2 3516041-2.patch714 bytesadinancenci

Issue fork wpf-3516041

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

adinancenci created an issue. See original summary.

adinancenci’s picture

StatusFileSize
new714 bytes

Here is how I solved it.

julio_retkwa made their first commit to this issue’s fork.

adinancenci’s picture

Issue summary: View changes

adinancenci’s picture

Hello. I've raised a merge request with a fix.
Needs review.

Thank you.

adinancenci’s picture

Status: Active » Needs review
julio_retkwa’s picture

Hi @adinancenci I've just tested this following the steps
1. Upload an image with an uppercase extension.
2. Try to open the fallback.

And is working fine

Thank you!

dj1999’s picture

Status: Needs review » Reviewed & tested by the community

dj1999’s picture

Status: Reviewed & tested by the community » Fixed
dj1999’s picture

Status: Fixed » Closed (fixed)