How to install GD on Heroku

Add "gd": "*" to composer.json and perform composer update

If that doesn't work add "ext-gd":" *" and do a composer update


In composer.json file

"require": {
        "facade/ignition": "^2.3.6",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3",
        "ext-gd": "*"

    },

Update composer and push to origin branch

composer update

git add .

git commit -m "message"

git push origin <branch name>

Rebuild your project at Heroku

https://devcenter.heroku.com/articles/php-support#extensions


I run composer require ext-gd and git push heroku master it did work.

I tried add "gd": "*" to composer.json and perform composer update but when push to Heroku meet error with Class 'Symfony\Component\HttpFoundation\InputBag' not found. I think it's not only update ext-gd with composer update