i need to a request mapper that match only images in any path level.

For example, it must match;

```
http://localhost:8080/filename.jpg
http://localhost:8080/figs/filename.jpg

```

I tried regex and non-regex way;

```
@RequestMapping(value = "{reg:(?:\\w|\\W)+\\.(?:jpg|bmp|gif|jpeg|png|webp)$}", method = RequestMethod.GET)

```

But, it matches with `http://localhost:8080/filename.jpg` but not matches with `http://localhost:8080/figs/filename.jpg` or `http://localhost:8080/anypathlevelNtimes/
figs/filename.jpg`

How can it matches with all path level and file extension is only image.

**Edit: It is OK now**

```
@RequestMapping(value = {"/**/{extension:(?:\\w|\\W)+\\.(?:jpg|bmp|gif|jpeg|png|webp)$}"}, method = RequestMethod.GET)

```