Laravel Vapor Solution: Undefined Function imagettfbbox()
jtomek opened this issue · 0 comments
jtomek commented
Situation
I'm switching to Laravel Vapor.
Complication
Fresh "vapor deploy" is causing the following error
"Call to undefined function Intervention\Image\Gd\imagettfbbox()"
A solution is not readily available online.
Cause:
The error is complaining about the location of your Fonts in your Lambda.
Solution:
You can specify a custom fonts location like this:
(new Avatar(['fonts' => [resource_path('fonts/yourfont.ttf')]]))
Maybe this will help somebody solve the problem faster.