Html helper img src and class

Ok original code in listview prior to helper:

$linev = '';
 $elink = DIR . "dog/view?dogid={$row->dogid}";
 $linev = "<td class=\"imgtd\"><a href=" . $elink . ">";
 $linev = $linev . '<img src="' . "../webroot/" . 'upload/imgdogs/' . $row->dogpic . '" alt="" class="image"></a></td>';
 echo $linev;

This opens a view / detailed page and works. the url looks like

http://localhost/cakephp/dog/view?dogid=91

Now the code I attempted, docs didn’t show a complete example of an image with link with class applied

                    echo '<td>';
                    echo $this->Html->link(
                            $this->Html->image('imgdogs/' . $row->dogpic, array(
                                'class' => 'image',
                                'alt' => ''
                            )), array(
                        'controller' => 'Dogs',
                        'action' => 'view', '?dogid=' . $row->dogid
                            ), array(
                        'class' => 'imgtd',
                        'escape' => false //to allow the image tag within the link
                            )
                    );
                    echo '</td>';

which works, but the view page has this for url

http://localhost/cakephp/dogs/view/%3Fdogid%3D91

A slash to right of view and %3F and %3D. How do I use helper yet have this

http://localhost/cakephp/dog/view?dogid=91

I am fairly new to cakephp, but not php. I have also used laravel in past.

Note, found example on stackoverflow.

http://book.cakephp.org/3.0/en/views/helpers/html.html#creating-links

echo $this->Html->link('View image', [
    'controller' => 'Images',
    'action' => 'view',     
    1,
    '?' => ['height' => 400, 'width' => 500]
]);

Ok thanks, I saw it it docs, but it didn’t catch me. this line did the trick

'?' => ['height' => 400, 'width' => 500]

Just changed to

'?' => ['dogid' => $row->dogid]

A followup, I have the images in

mysite/webroot/img/imgdogs

any idea how to call them if folder was

mysite/webroot/upload/imgdogs

in app.php there is https://github.com/cakephp/app/blob/master/config/app.default.php#L49
'imageBaseUrl' => 'img/', just modify it to your needs

yeah sometimes things are mentioned only once in docs so it can be hard to catch