DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:svgpureinsert

svg pureinsert Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" no
  • 2015-08-10 "Detritus" unknown
  • 2014-09-29 "Hrun" yes

plugin Inserts an SVG image as-is to be rendered by compatible browsers

Last updated on
2015-02-05
Provides
Syntax
Repository
Source

Tagged with diagram, images, media, svg

Security advisory

Allowing SVG Upload equals to allowing HTML + JS upload. Details here: SVG Upload Security Risks

Do not allow everyone to post SVG's! to Your DokuWiki

Compatibility info

As of October 2016 (Elenor Of Tsort) this plugin renders images as boxes with a regular SVG error message. However, Elenor of Tsort can handle SVG images just fine and passes the SVG source directly to the browser. So this plugin is not needed anymore.

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

To enable the “media” support for SVGs you need to edit or create conf/mime.local.conf and add at the bottom entry:

conf/mime.local.conf
svg     image/svg+xml

Please note that SVG images are supported in modern browsers only. It will not work in Internet Explorer 8 or lower. Refer to SVG compatibility list for a list of compatible Browser versions.

Usage

Usage follow the DokuWiki standard Image Syntax with the following features supported:

  • alignment
  • resizing
  • titles can be set but will not be shown currently

Note: this plugin will download and cache remote SVGs. SVGs are rewritten to automatically scale to any viewport (maintaining the aspect original ratio).

Version History

svgpureInsert 1.05

Thanks to Konstantin for sharing better code. Open Source rox!

  • fixed issue appeared when you use dokuwiki over https (SSL)
  • fixed issue with output of dia's SVGs
svgpureInsert 1.04
  • changed name to svgpureInsert not to collide with svg plugin
  • some other stuff done by: Goulven Guillard, thanks for sharing better code!:
    • corrected the remote installation
    • corrected preg_match regular expressions which didn't work fine
    • set $_GET results into variables
svg_pureInsert 1.03
  • some issues with “mm” and “px” size of svg
  • other issues with resizing
  • now supports remote installation
svg_pureInsert 1.02
  • svg_pureInstert do not disturb other media files (there was issue while using SVG and JPG images on the same page)
  • if no size of SVG file is given (e.g. {{egzm.svg|} }), we use default (written into SVG) image size - “You want to set not numeric width or height…” error
svg_pureInsert 1.01
  • added namespace support, just forgot to test it before now: { {mcol:mcol_worm.svg?100 } } will point to proper directory (mcol/mcol_worm.svg)
plugin/svgpureinsert.txt · Last modified: 2016-12-20 23:31 by KaiMartin