0
votes

The problem:

For some reason I can't get ImageMagick working on MediaWiki site. MediaWiki installed on Linux server. MediaWiki: 1.16.4. PHP: 5.2.17. ImageMagick: 6.6.0-4 2010-11-16 Q16

Using the next configuration in LocalSettings.php

$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgFileExtensions[] = 'svg';
$wgSVGConverter = 'ImageMagick';

path /usr/bin/convert available from the home directory. /image has the permissions: drwxt-xr-x.

As soon as I enable ImageMagick ($wgUseImageMagick = true;) all thumbnail generation stopping working (even for PNG, JPG, GIF). I get error message on all generated thumbnails: "Error creating thumbnail:" (without any additional message). If I disable it, that it works fine for PNG, GIF and JPG formats. But the problem that I have to support SVG format as well...

Any ideas how I can get ImageMagick working?

Regards, Alex

2
Anyone can suggest something? - Mr. Pumpkin
If you run the convert command from the command line do you get any errors? Is the anything in the Apache error logs? - Christian

2 Answers

1
votes
$wgMaxImageArea = 100 * 1000 * 1000;
$wgMaxShellMemory = 10000000;

Try this.

0
votes

You must edit the file policy.xml (try `find -name policy.xml, the location may vary depending on your OS) using sudo and your preferred text editor and perform the following changes:

Remove:

<policy domain="coder" rights="none" pattern="MVG" />

And add this line:

<policy domain="coder" rights="read | write" pattern="MSVG" />

Save the file and try to upload another svg file. The error must be gone away.