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?
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?
Share Improve this question edited Feb 12, 2013 at 23:47 Pustiu314p asked Feb 12, 2013 at 23:31 Pustiu314pPustiu314p 633 bronze badges 1- 1 It does not but you can try ImageMagick stackoverflow./a/11321611/1581448 – Kris Georgiev Commented Feb 12, 2013 at 23:50
2 Answers
Reset to default 9On Heroku, GD is a "shared" extension that you can enable in poser.json. No custom buildpack required, just add the ext-gd line in your poser.json
:
{
"require": {
"ext-gd": "*"
}
}
You'll need to use a custom buildpack with imagick or gd piled 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./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.)