heroku buildpacks:add https://github.com/thomasgallagher/heroku-buildpack-imagemagick --index 1
You can also add this via Settings > Buildpacks on the Heroku dashboard
Optional: Fork this repo and replace the above URL to make it your own:
https://github.com/thomasgallagher/heroku-buildpack-imagemagick
You may need to make a trivial code change to do this.
heroku run identify --version
Version: ImageMagick 7.1.0-61 Q16-HDRI x86_64 20866 https://imagemagick.org
Run your test suite and manually test any features that make use of ImageMagick.