You must capture 3 elements from the requested URI.
The valid URI format will be as follows:
/users/{id}.{size}.{type}
While id and size can be numbers. And the type can only be "jpg" or "png".
A twist is that size is optional. Therefore, another URI format would be:
/users/{id}.{type}
Valid examples are:
/users/123.100.jpg /users/123.100.png /users/123.jpg /users/123.png
Invalid examples:
/users/asd.jpg /users/123.tiff /users/123..jpg /users/123..100..jpg /users/123..100.jpg /users/123.100
Thanks.
source share