Can Scalable Vector Graphics (*.svg) be embedded into wiki pages?
NOTE: SVG support has been available to the pmwiki core since version 2.2.85, 2016-03-31.
That means, that most likely you don't need this recipe.
Just insert the svg in your page, like you would insert another image.
Most browsers released in the recent years support it:
to your config.php file, and any link ending in ".svg" will automatically be converted to HTML code for an embedded svg graphic.
If you want up upload svg-files you have to enable the file type. Add this to config.php:
$UploadExts['svg'] = 'image/svg+xml'; $UploadExts['svgz'] = 'image/svg+xml';
When using this, the
%width=300 height=200% WikiStyle has to be placed before the svg file name to define the painting area (set the width and height of your graphic in pixels).
When installed with Cookbook:Ape, this recipe doesn't allow the Ape recipe to define the frame width and height.
- 20161021 Disable core handling of SVG links (since PmWiki 2.2.85), fix $RecipeInfo.
- 20150919 Update for PHP 5.5, use non conflicting $SvgTagFmt variable, accept ".svgz" extension, add $RecipeInfo.
See discussion at Svg-Talk.