Hi,
after upgrading from version 0.8.5 to version 0.8.6 my local images stopped working, showing message "Image not found or type unknown". Linking image from remote host works fine.
i use image like this:
<img src="images/logo.jpg" alt="logo"/>
i've also tried full path like this:
<img src="var/www/myproject/images/logo.jpg" alt="logo"/>
After downgrading dompdf back to 0.8.5 image is working again.
I have php , html5 parser and remote enabled:
$options = new Dompdf\Options();
$options->setIsPhpEnabled(true);
$options->setIsHtml5ParserEnabled(true);
$options->setIsRemoteEnabled(true);
Any suggestions what might be the reason for that? Im loading dompdf via composer.
With 0.8.6 Dompdf honors the chroot restriction for resource references (images, external stylesheets). You should be able to address the issue by adding the following option:
$options->setChroot("/var/www/myproject");
Works like a charm! Thanks!
Duplicate of https://github.com/dompdf/dompdf/issues/2229
Most helpful comment
With 0.8.6 Dompdf honors the chroot restriction for resource references (images, external stylesheets). You should be able to address the issue by adding the following option: