[英]DOMPDF: Image not readable or empty. (with barryvdh/laravel-dompdf)
I'm using DOMPDF along with Laravel-dompdf and after hours of research I cannot find a solution that will enable my images to render. 我正在将DOMPDF和Laravel-dompdf一起使用,经过数小时的研究,我找不到能使图像渲染的解决方案。 I've referenced these questions already:
我已经引用了以下问题:
DomPDF: Image not readable or empty DomPDF:图片不可读或为空
dompdf image not real image not readable or empty dompdf图像不真实,图像不可读或为空
In both package config files I have def("DOMPDF_ENABLE_REMOTE", true);
在两个软件包配置文件中,我都有
def("DOMPDF_ENABLE_REMOTE", true);
and def("DOMPDF_ENABLE_AUTOLOAD", true);
和
def("DOMPDF_ENABLE_AUTOLOAD", true);
. 。 And of course I have checked the paths, they are all correct.
当然,我已经检查了路径,它们都是正确的。 I also tried this solution , which didn't work for me.
我还尝试了此解决方案 ,但该解决方案对我不起作用。
Can anyone offer a different solution? 谁能提供其他解决方案?
I solve this problem by using publich path: 我通过使用publich路径解决了这个问题:
<img src="{{ public_path('image.jpg') }}" />
and work on image. 并致力于图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.