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: stable |
|
---|---|
Implementation | Media |
Description | Serves SVG images directly to clients |
Author(s) | alistair3149talk |
Latest version | 1.4.0 |
Compatibility policy | Master maintains backward compatibility. |
MediaWiki | 1.35+ |
Database changes | No |
Composer | mediawiki/native-svg-handler |
License | GNU General Public License 3.0 |
Download | |
Quarterly downloads | 292 (Ranked 38th) |
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.
InstallationEdit
- Download and place the file(s) in a directory called
NativeSvgHandler
in yourextensions/
folder. - Add the following code at the bottom of your
LocalSettings.php
:wfLoadExtension( 'NativeSvgHandler' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
SecurityEdit
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 alsoEdit
$wgSVGNativeRendering
(introduced in 1.41)
This extension is included in the following packages and/or wiki farms: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |