I am creating a pdf from html
require_once('tcpdf/tcpdf.php');
.....
$content .='img src="/img.png" width="50" height="50">'
$obj_pdf->writeHTML($content,true, 0, true, 0);
$obj_pdf->Output('sample.pdf', 'I');
But this error appears to me
Warning: imagecreatefrompng (/img/img.png): failed to open stream: No such file or directory in ......... \ page-template \ tcpdf \ tcpdf.php on line 7033
The file and the image are in the page-template folder but the image is looking for the tcpdf folder.