About cakephp/routing

Hi guys,

I have created a route like this:

    $routes->connect('/thumbnail/:widthx:height/:image', ['controller' => 'Image', 'action' => 'thumb'], [
        'pass' => ['image', 'width', 'height'],
        'width' => '\d+',
        'height' => '\d+',
    ]);

and I want it match /thumbnail/200x300/foo-bar.png,however it doesn’t work.
I think I need some help.

You are putting :width-:height in routing and want to access 200x300. You have to put either ‘x’ on both places or ‘-’.

Sorry, some mistake,The original route like this;

    $routes->connect('/thumbnail/:widthx:height/:image', ['controller' => 'Image', 'action' => 'thumb'], [
        'pass' => ['image', 'width', 'height'],
        'width' => '\d+',
        'height' => '\d+',
    ]);

Becase “x” is a valid english character, now I have replace “x” with “-”;
I think cakephp/routing is flawed.

How is your thumb() action defined ? It should have at least the three params, in the order they are passed if you want to do something with them in your action: thumb($image, $width, $height)