Route Name file

i need to create a route

this kind

/imagem-abc-100x100.jpg

$app->get(’/{slug}-{widht\d{1,11}+}x{height\d{1,11}+}.jpg’, ‘App\Action\Image:index’);

only when I add the .jpg doesn’t work

You could probably set up a route /images and pass in URL parameters for width, height and filename (e.g. ‘?w=100&h=100&f=imagem-abc.jpg’) then have your web server pass requests for jpg-files to this route, or a standalone PHP script.

Using . in route declarations is not a good idea and I doubt the router in Slim can handle it.

You should try the correct syntax for Route placeholders:

$app->get('/{slug}-{width:[\d]{1,11}+}x{height:[\d]{1,11}+}.jpg', 'App\Action\Image:index');