使用Spipu \ Html2Pdf转换图像时出错

时间:2018-12-26 08:43:30

标签: laravel-5 html2pdf

在我的laravel 5.7 / Blade应用程序中,我使用Spipu \ Html2Pdf和tring转换一些包含图像引用的html代码,但出现错误:

Spipu \ Html2Pdf \ Exception \ ImageException (2)
Unable to get the size of the image [/storage/user-avatars/-user-avatar-5/rad_soang_avatar.jpg?dt=1545812433]

在网上搜索时,我发现在某些其他系统(不是laravel)中,我必须为任何图像做一些包装,但是我没有找到 laravel / blade应用程序必须使用哪种包装?。

谢谢!

1 个答案:

答案 0 :(得分:0)

您是否尝试使用资产方法来包装图片网址,例如:

<img src="{{ asset($image_url]) }}