heroku report me a error: Call to undefined function imagecreatefromjpeg() ..at line 177, where at line 177 is: case 'jpg': case 'jpeg': $image_data = imagecreatefromjpeg($src_image); break;
I think heroku does not support jpeg or something, what can I do in that case?
On Heroku, GD is a "shared" extension that you can enable in composer.json. No custom buildpack required, just add the ext-gd line in your composer.json
:
{
"require": {
"ext-gd": "*"
}
}
You'll need to use a custom buildpack with imagick or gd compiled in.
I don't believe the latest version of heroku's official PHP buildpack has support for this, but I've created my own buildpacks for this too.
See https://github.com/winglian/heroku-buildpack-php (This version is built on 5.4.11 using PHP-FPM, but you can choose an older tagged branch for 5.3 support using mod_php.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With