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
After some chat with Randy Fay on slack, he suggested adding the following to my
config.yaml
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.
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 forconvert
command andphp-imagick
PHP module.