-1

I am trying to upload images through Laravelbackpack. Everything work properly in localhost, but when I deploy it on Heroku it fails.

The line that is causing the server error is: $image =\Image::make($value)->encode('jpg', 90);

Petro Bianka
  • 135
  • 1
  • 8

1 Answers1

1

From my understanding, you're using Intervention image library. It requires PHP-GD or Imagick PHP extension. You can use GD for example. Heroku doesn't install it as default, but you can easily do it by requiring it in your composer.json file:

{
    ...
    "require": {
        ...
        "ext-gd": "*",
        ...
    }
    ...
}

Heroku PHP Support doc page

Tony
  • 401
  • 3
  • 8
  • Works like a charm. I am just surprised why I could not find anything about this step in laravel backpack docs since they were using this code as boilerplate. – Petro Bianka Sep 02 '20 at 21:25