sub thumbnail :Regex('^thumbnail/(.+)') { my ($self, $c) = @_; my $image_id = $c->req->captures->[0]; $image_id =~ s/\//\\/g; my $image_obj = $c->model('File')->slurp($image_id) or $c->detach('/default'); $c->stash->{scaling} = 'fit'; $c->stash->{x} = 100; $c->stash->{image} = $image_obj; $c->forward('View::Thumbnail'); }