Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regex to match file extension in image caching #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

orindholt
Copy link

The current way that the pathname in caching images was problematic, because it was impossible to add multiple file extensions on the endsWith string method. This makes it way easier to just include other file extensions. As I wrote in the comment above the changed line, you can add in any other file extensions by including the necessary file extension name in the regex, ex. (jpg|png|gif).

The current way that the pathname in caching images was problematic, because it was impossible to add multiple file extensions on the endsWith string method. This makes it way easier to just include other file extensions. As I wrote in the comment above the changed line, you can  add in any other file extensions by including the necessary file extension name in the regex, ex. (jpg|png|gif).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant