I’m new to cakephp and I want to make a link with an image.
so I tried this:
$this->Html-link($this->Html->Image('image.png'),'http://website.com');
which I found online. I can’t figure out where I need to keep the image files at though. my google searches just had results that said to use the line of code above, but no mention of where the images files should be kept on the file system.
You’re missing a
>:$this->Html-link($this->Html->Image('image.png'),'http://website.com');$this->Html->link($this->Html->Image('image.png'),'http://website.com');As for your question, where you store the image is up to you. I’m sure
Image('image.png')can also take a path likeImage('../images/image.png')or whatever you want. You just need to tell it where the image is in that line of code.