TechKat's avatar

Regex for image files

Is it possible to define a route in Lumen with regular expressions so that if an image file, such as .png, .jpg, .gif etc via the root URL is present, it uses said route?

For example:

http://project.com/uploadedImageFile123.png --> /{image:[.jpg|.png|.gif]+}

It can't work for subfolders though such as assets, so for example:

http://project.com/img/banner.jpg --> /root/public/img/banner.jpg

0 likes
0 replies

Please or to participate in this conversation.