Topic on Project:Support desk

Zellfaze (talkcontribs)

I'm trying to setup SVG support for the Wiki that I've manage to get the company I work for to use. I'm having a bit of trouble though. After seeing how terrible a job ImageMagick does with rendering SVGs, I decided to use librsvg like the WMF projects do.

For some reason my SVGs are rendering as http://img526.imageshack.us/img526/9941/fileiconsvg.png The source SVG is the checkbox used for {{check}} on Wikipedia.

The only lines I have added to my LocalSettings.php relating to SVGs are

#Allow SVG Uploads
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'librsvg';

The server is running Ubuntu, and has the package for librsvg installed.

Special:Version on my Wiki reports the following:

MediaWiki1.18.1
PHP5.3.2-1ubuntu4.17 (apache2handler)
MySQL5.1.63-0ubuntu0.10.04.1

Any ideas what might be the issue? My guess is that librsvg is setup wrong, but Googling around for a solution didn't really turn up a whole lot.

Zellfaze (talk) 13:19, 24 July 2012 (UTC)

Bawolff (talkcontribs)

That's the icon we use when MediaWiki cannot render the svg.

Make sure that rsvg binary is in the apache user's path, or ensure that $wgSVGConverterPath is set correctly (you can use the which rsvg command to determine the appropriate path). Also make sure the rsvg binary is actually named rsvg (some distros its called rsvg-convert, see Manual:$wgSVGConverters#Linux ).

If that's all good, try invoking rsvg from command line just to make sure it works.

Bawolff (talkcontribs)

Actually, first step before doing what I said above, try using:

$wgSVGConverter = 'rsvg';

instead of the librsvg you had above.

Zellfaze (talkcontribs)

Changing it to

$wgSVGConverter = 'rsvg';

worked wonderfully. Thank you so much.

Reply to "SVG Rendering Issues"