You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The regex for identifying Thumbor requests has some problems:
const matchThumbor = new RegExp(/^(\/?)((fit-in)?|(filters:.+\(.?\))?|(unsafe)?).*(.+jpg|.+png|.+webp|.+tiff|.+jpeg)$/);
There are a couple of issues with this regex:
- The first part is pointless, because all of the alternatives are optional, and it then does a match on anything .* - so first part has no effect as it matches anything anyway
- The list of image file extensions is an unreliable way to match the path. For instance, I had an issue with a jpg where the file extension was capitalised.
The text was updated successfully, but these errors were encountered:
Personally I think this should match json, then fall back to thumbor style.
I had to change the code because the images I was using do not have any extension
We have updated our solution, and I believe your issue has been fixed. If you still see the issue with the latest version (v4.2), please feel free to reopen the issue.
The regex for identifying Thumbor requests has some problems:
const matchThumbor = new RegExp(/^(\/?)((fit-in)?|(filters:.+\(.?\))?|(unsafe)?).*(.+jpg|.+png|.+webp|.+tiff|.+jpeg)$/);
The text was updated successfully, but these errors were encountered: