I want to set custom values for ImageMagick parameters via a
policy.xml file but my changes aren't being recognized.
ImageMagick is unusual in that the global policy files override the local ones by default. The load order for policy files is described here: https://imagemagick.org/script/resources.php
The solution in this case is to ensure that any custom policy files appear first in the
MAGICK_CONFIGURE_PATH. For example, creating a file in the root of your app at
.magick/policy.xml you can set the following:
heroku config:set MAGICK_CONFIGURE_PATH="/app/.magick/:/etc/ImageMagick-6/"
This should ensure that your custom file takes precedent over the global config file.
You can verify which settings are being loaded by using the following command:
identify -list policy