For some reason, DomPDF won't render an image included in the html that is being parsed:
However, the image is rendered on the page when it is returned as html:
I've looked at these issues and have make sure that DOMPDF_ENABLE_REMOTE is set to true and verified file permissions:
dompdf image not real image not readable or empty
Image error in DOMPDF for ZF2
Are there any other things that I should be checking for?
Ok I had the same problem with image using :
But if I add a . before /images, without changing anything in dompdf_config.custom.inc, it works
Hope it helps
Now (May 2018) the correct way is :
In path :
change settings
то true.
Following helped me like charm, at least localy, and even with
The solution is to change the image SRC to the absolute path on the server, like this:
All of the following worked for me:
$_SERVER["DOCUMENT_ROOT"] is C:/wamp/www/ZendSkeletonApplication/public
Thanks to this: lost in code
As there was another answer that suggests enabling the remote option in
module.config.php
and I can't yet add comments, I thought it would be best to answer that this file does not exist in newer versions of DomPDF.If you need to include remotely stored images in a newer version you have to pass it as an option to the constructor:
This fixed the issue I had.
I solve this problem by using external CSS's full path. This one worked on my linux ubuntu server :
<link href="{{ public_path('css/style.css') }}" />
<img src="{{ public_path('images/image.jpg') }}" />
and work on image.