php
php copied to clipboard
Add Imagick extension
Feature Request
It looks like Imagick extension is missing for now. I'm using a library for generating QR-code in my Laravel application and it requires the support of Imagick for generating QR-code images in PNG format (I also need it for user to be downloadable, so it's really needed).
It looks like it's a tiny extension and won't bring troubles with issues with lambda. http://pecl.php.net/package/imagick
Hi @f3l1x ! Is there any chance to get this update for upcoming releases? Heroku is closing it's free tier soon and I'm looking forward for moving to Vercel this month. So maybe, it will be possible due to adding Imagick extension into your runtime :)
Hi @testliopavel, I will take a look. I hope imagick will be not 20 MB binary :-D
There is a little problem with imagick on AmazonLinux 2 with Remi's RPM repository (https://blog.remirepo.net/pages/PECL-extensions-RPM-status).
#10 23.50 --> Processing Dependency: libraw_r.so.19()(64bit) for package: ImageMagick6-libs-6.9.12.64-1.el7.remi.x86_64
#10 23.50 ---> Package libpciaccess.x86_64 0:0.14-1.amzn2 will be installed
#10 23.50 --> Processing Dependency: hwdata for package: libpciaccess-0.14-1.amzn2.x86_64
#10 23.50 --> Running transaction check
#10 23.50 ---> Package ImageMagick6-libs.x86_64 0:6.9.12.64-1.el7.remi will be installed
#10 23.51 --> Processing Dependency: libraw_r.so.19()(64bit) for package: ImageMagick6-libs-6.9.12.64-1.el7.remi.x86_64
#10 23.51 ---> Package hwdata.x86_64 0:0.252-9.3.amzn2 will be installed
#10 23.54 --> Finished Dependency Resolution
#10 23.61 Error: Package: ImageMagick6-libs-6.9.12.64-1.el7.remi.x86_64 (remi)
#10 23.61 Requires: libraw_r.so.19()(64bit)
#10 23.61 You could try using --skip-broken to work around the problem
#10 23.66 You could try running: rpm -Va --nofiles --nodigest
According to Bref (alternative tool for serverless PHP), there is so much dependencies for Imagick extension. Vercel Serverless Functions have hard limit of 50Mb. In this case we'd need to use another AWS lambda layer.
https://github.com/brefphp/extra-php-extensions/blob/105f25ab3cdc12188ca031cef4205ff033d16b83/layers/imagick/Dockerfile#L70-L109
Anyway, I am still investigating how to do it. But I have no ETA at this moment.