How to Install Imagick with SVG extensions?

I’ve been able to successfully get Imagick installed on my servers by adding a custom PHP extension to trellis/group_vars/all/main.yml as suggested by Trellis with ImageMagick PHP extension

php_extensions_custom:
  - php-imagick

However, I’m stumped at how I should add the additional dependencies I need to work with SVG images. Specifically, rsvg.

Trellis should probably have a variable to allow pear packages which would be installed.

But you can always use http://docs.ansible.com/ansible/latest/pear_module.html and create a custom role to run that task to install rsvg.

1 Like

Hi Scott, thank you for taking the time to reply!

Just for clarification, when you say “Trellis should probably have a variable…” does this mean Trellis has one currently or should have one in the future?

Should have one in the future. If you want you could modify the PHP role to support pear packages and submit a pull request :slight_smile:

2 Likes