DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:svgpureinsert

svg pureinsert Plugin

Compatible with DokuWiki

Hrun

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

Last updated on
2015-03-16
Provides
Syntax
Repository
Source
Conflicts with
combo

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

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

Search and install the plugin using the Extension Manager. 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: 2022-07-17 22:24 by coastGNU

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki