SVG thumbnails black on live server On my MAMP development server, SVG files display like this in the Assets section of the Control Panel:



On my live server, they get a black background:


When I use an SVG file inside an img tag with an transform like this:

&lt;img src="{{ iconSVG.getUrl(iconSize) }}"&gt;


I got this working fine on the MAMP server, but on the live server the file gets transformed into a PNG with a black background.

I don't necessarily have to use a transform on the SVGs, so could leave that out, but the black thumbs in the Assets isn't that pretty.

I checked both servers, and a possibly relevant difference I can see is that the MAMP does not have imagick, whereas the live server does.

How can I fix the black thumbnail issue? Would I need to disable imagick on the live server somehow?
Craft requires Imagick to do any SVG transforms, so that fact that it is working on your MAMP install without it is the only weird thing I see here. :)

Craft will attempt to use Imagick if it is available on the server and fallback to GD otherwise or you can explicitly tell it which one to use via the imageDriver config setting.

As to why it's all black on production, make sure you're using a recent version of both the Imagick PHP extension as well as the underlying Imagick library.