我将 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 ,这对我不起作用。
谁能提供不同的解决方案?
最佳答案
我通过使用公共(public)路径解决了这个问题:
<img src="{{ public_path('image.jpg') }}" />
关于php - DOMPDF:图像不可读或为空。 (与 barryvdh/laravel-dompdf),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26618246/