# Route Name file

**URL:** <https://discourse.slimframework.com/t/route-name-file/3599>\
**Category:** Questions\
**Created:** [October 30, 2019, 8:15pm UTC](https://discourse.slimframework.com/t/route-name-file/3599 "2019-10-30T20:15:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvisreis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/elvisreis/32/1298_2.png) [@elvisreis](https://discourse.slimframework.com/u/elvisreis)\
**Post date:** [October 30, 2019, 8:15pm UTC](https://discourse.slimframework.com/t/route-name-file/3599/1 "2019-10-30T20:15:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cess11](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cess11](https://discourse.slimframework.com/u/cess11)\
**Post date:** [October 31, 2019, 2:04pm UTC](https://discourse.slimframework.com/t/route-name-file/3599/2 "2019-10-31T14:04:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [November 3, 2019, 6:05pm UTC](https://discourse.slimframework.com/t/route-name-file/3599/3 "2019-11-03T18:05:02Z")

</div>

You should try the correct syntax for [Route placeholders](http://www.slimframework.com/docs/v4/objects/routing.html#route-placeholders):

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

```
