I am trying to show image at view from webroot in cakephp. But I didn't get any image. Please help me;
Is this code correct
$this->Html->image('WWW_ROOT . img/upload/aswq.png', array('width'=>'200px'));
you can use in this way to show image from webroot folder. just notice that img folder already included path in html helper
echo $this->Html->image('upload/aswq.png', array('width' => '200px','alt'=>'aswq'));
Will output:
<img src="/img/upload/aswq.png" alt="aswq" />
let me know if i can help you more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With