skip to Main Content

I need to do some SVG manipulation, specifically create PNG thumbnails from SVG icons.
This works fine when running the site through MAMP, but not when running it through DDEV.

When running convert -list configure it justs it as --without-rsvg, which I assume means it doesn’t configure imagemagick to run with rsvg support. It also does not list SVG as a supported format when running convert -list format.

As explained by Randy Fay, DDEV’s web container runs as a Debian Stretch, so while the question is specifically for DDEV, it can also be relevant to enabling support on Debian Stretch containers in general.

Question:
How to I enable SVG support for Imagemagick?

2

Answers


  1. Chosen as BEST ANSWER

    After some chat with Randy Fay on slack, he suggested adding the following to my config.yaml

    webimage_extra_packages: [libmagickcore-dev]
    

    After doing that and a restart of the projet, it adds SVG support and everything now works as expected.

    This was a very quick fix, so many thanks to Randy Fay for helping out.


  2. Actually, it’s enough to install the libmagickcore-6.q16-6-extra package, which adds support for SVG to imagemagick (cf. apt show libmagickcore-6.q16-6-extra). It solves the problem both for convert command and php-imagick PHP module.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search