DOMPDF:图像不可读或空。 (与barryvdh / laravel-dompdf)

时间:2014-10-28 20:52:39

标签: php html image laravel dompdf

我使用DOMPDF和Laravel-dompdf,经过数小时的研究后,我找不到能够渲染我的图像的解决方案。 我已经引用了这些问题:

DomPDF: Image not readable or empty

dompdf image not real image not readable or empty

在两个包配置文件中,我都有def("DOMPDF_ENABLE_REMOTE", true);def("DOMPDF_ENABLE_AUTOLOAD", true);。当然,我已经检查了路径,它们都是正确的。我也试过了this solution,这对我来说并不起作用。

有人可以提供不同的解决方案吗?

1 个答案:

答案 0 :(得分:0)

我使用publich路径解决了这个问题:

<img src="{{ public_path('image.jpg') }}" />

并处理图片。