In case anyone is devloping in Ubuntu, you can not get the correct version of ImageMagick from an apt repo at the moment.
This means a few integration tests will regularly fail on local.
To get version 7 we have a very simple script you can run which we maintain:
Just download it and execute it.
wget https://raw.githubusercontent.com/discourse/discourse_docker/master/image/base/install-imagemagick chmod +x install-imagemagick sudo ./install-imagemagick
Alternatively, use our docker dev image which solves this problem quite nicely: