10

Heroku Cedar-14 stack currently runs a version of ImageMagick (6.7.7-10) that is nearly a year old:

Running `identify -version` attached to terminal... up, run.8227
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

I want to use the -canny option that performs edge detection in an image, but this was only introduced in a later version of ImageMagick.

The only available buildpack for ImageMagick on Heroku does not work on the Cedar-14 stack: https://github.com/mcollina/heroku-buildpack-imagemagick

Is there a way I can use ImageMagick v6.8.9-0 or later on Heroku?

Thanks in advance!

Rob d'Apice
  • 2,416
  • 1
  • 19
  • 29

2 Answers2

10
// check image magick version
heroku run identify -version
heroku config:add IMAGE_MAGICK_VERSION="6.9.3-8"
// if you set buildpacks then your original buildpacks lost
heroku buildpacks:add --index 1 https://github.com/ello/heroku-buildpack-imagemagick.git
// commit
git push heroku master
heroku run identify -version
V-SHY
  • 3,925
  • 4
  • 31
  • 47
  • Coming to this over a year later but I can't tell that the buildpack/heroku respects the IMAGE_MAGICK_VERSION you're setting. Trying to get imagemagick to 7.0.1-1 and cant get anything to stick. Have you had any issues with this? – Datise Jun 12 '17 at 19:26
  • 1
    @Datise Refer to the commit of the repo of the buildpack, it only supports until version 6.9.5-10 – V-SHY Jun 13 '17 at 07:37
  • @Datise, may be you can give a try for what mentioned in this link, http://www.jasonfleetwoodboldt.com/writing/2016/05/21/paperclip-rails-and-heroku-how-do-i-make-my-images/ . author said it supports ImageMagick *7.0.24*, with: https://github.com/jasonfb/heroku-buildpack-cedar14-imagemagick704 . I found this with element search result via https://elements.heroku.com/search?utf8=%E2%9C%93&q=imagemagick – V-SHY Jul 09 '17 at 02:08
5

Here is a potential option for using at least ImageMagick 6.8 on Heroku with the Cedar-14 stack: https://github.com/ello/heroku-buildpack-imagemagick-cedar-14

Magne
  • 16,401
  • 10
  • 68
  • 88
  • I think this might work! I'm still a week or two off deploying but will give this a go. Thanks. – Rob d'Apice Apr 15 '15 at 08:43
  • 2
    There is a newer version (6.9.5-10), at https://github.com/ello/heroku-buildpack-imagemagick – Jason May 10 '17 at 15:47
  • 1
    Unfortunately, the read me offers no advice on what to do. Can anyone give a step by step idiots guide to how to upgrade ImageMagick on Heroku - I'm getting loads of translation errors in prod that I don't see on my dev environment. – Michael Taylor Aug 22 '17 at 15:23
  • This might point you in the right direction: https://github.com/thoughtbot/paperclip/wiki/Upgrade-Imagemagick-On-Heroku – Magne Aug 24 '17 at 13:58