I set up an laravel application at AWS Lambda, using Bref . Everything works fine, including filesystem and s3 filestorage. I use spatie's medialibrary to handle file upload and media conversions, and I can upload a file without any troubles.
The problem appear when I try to make image conversions, using either GD or Imagick .
Whenever I try to make the conversions, I get the following errors:
When using Imagick:
Intervention\Image\Exception\NotReadableException
Unable to read image from path (/tmp/Glide0PSwRU).
When using GD:
Intervention\Image\Exception\NotReadableException
Unsupported image type. GD driver is only able to decode JPG, PNG, GIF or WebP files.
This only happens when running the application at AWS Lambda. If I run at my local environment or at another service like Google App Engine, with the "same" code configs (related to the upload/media conversion).
Create a php/conf.d/php.ini
in your project then add extension=imagick
or extension=gd
to enable these extensions
You can read the docs here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.