CakePHP: image inside link, want to make link point to image location
问题 I have some images inside links that I want to essentially look like this: <a href="/path/to/img.png"><img src="/path/to/img.png" /></a> Clicking on the link should load the image it contains. I'm trying to use CakePHP's HTML helper to do this, as follows: <?php echo $html->link( $html->image('img.png'), 'img.png', array('escape' => false) ); ?> When I do this, however, I get the following code: <a href="/pages/img.png"><img src="/path/to/img.png" /></a> Without using absolute URLs , can I