Extension:NativeSvgHandler
![]() | Browser support for rendering SVGs varies widely, so the appearance of an SVG cannot be guaranteed to be consistent for all viewers. Don't rely on SVGs appearing the same for all viewers. |
![]() Release status: stableCategory:Stable extensions |
|
---|---|
Implementation | MediaCategory:Media handling extensions |
Description | Serves SVG images directly to clients |
Author(s) | alistair3149talk |
Latest version | 1.4.0 |
Compatibility policy | Master maintains backward compatibility.Category:Extensions with master compatibility policy |
MediaWiki | 1.35+Category:Extensions with manual MediaWiki version |
Database changes | No |
License | GNU General Public License 3.0 |
Download | Category:Extensions in Wikimedia version control |
Quarterly downloads | 107 (Ranked 37th) |
Translate the NativeSvgHandler extension if it is available at translatewiki.net |
The NativeSvgHandler extension allows SVG files to be served directly to clients for client-side rendering. If you are running MediaWiki on a version newer or equal to 1.41, use $wgSVGNativeRendering instead.
Installation
- Download and move the extracted
NativeSvgHandler
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NativeSvgHandler - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'NativeSvgHandler' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Security
NativeSvgHandler serves SVG directly to clients through image tags, which is not vulnerable to XSS attack. XSS attacks are only relevant when it is accessed directly through original file on the file page, which is neither in the scope nor in control of this extension.
See also
$wgSVGNativeRendering
(introduced in 1.41)
![]() | This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
Category:All extensions
Category:Extensions in Wikimedia version control
Category:Extensions included in BlueSpice
Category:Extensions included in WikiForge
Category:Extensions included in semantic::core
Category:Extensions with manual MediaWiki version
Category:Extensions with master compatibility policy
Category:Extensions without an image
Category:GPL licensed extensions
Category:Media handling extensions
Category:SVG extensions
Category:Stable extensions