SVG image rendereing

MediaWiki software supports SVG image rendering. It is necessary to get thumbnail images from SVG files. If SVG support is enabled SVG images will automatically be rendered as a PNG file. For security reasons, SVG files containing JavaScript will be refused.

Localizing LocalSettings.php

 * Add
 * Define
 * — renderer to be used. Possible tools are ImageMagick, sodipodi, inkscape, batik, rsvg, and imgserv. Key to $wgSVGConverters.
 * — array of command-line calls as defined in includes/DefaultSettings.php.
 * — directory containing the tool. Specify if not in the system path.
 * — if true, will be allowed in files with an “image/svg” MIME type. Not set by default.
 * — prevents scaling if the SVG image size exceeds a maximum size given in pixels. Default value is 2048 set in includes/DefaultSettings.php.

Like in case of imgserv other variables should be modified:


 * — allow/disallow image scaling by ImageMagick. Other tools are GraphicMagick or imgserv.
 * — Specify the command-line call if $wgUseImageMagick is set false.

Rendering tools

 * ImageMagick — default renderer. Works, but is slow and buggily.
 * librsvg / rsvg — renderer at Wikipedia / Wikimedia Commons. Fast but not very accurate. Short rsvg manual
 * Batik — slow but most accurate SVG renderer available.
 * Inkscape — renderer at Wikivoyage. Slower than rsvg, relatively accurate SVG renderer. Produces line artefacts (broken lines, adding horizontal lines). Manual with description of the command-line parameters.
 * Sodipodi — precursor of Inkscape but no longer under development.
 * imgserv — Java-based image scaling and rasterization.