Extension:NativeSvgHandler
From Linux Web Expert
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. |
NativeSvgHandler 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 | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
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.
Installation
- <translate> [[<tvar name=2>Special:ExtensionDistributor/NativeSvgHandler</tvar>|Download]] and move the extracted <tvar name=name>
NativeSvgHandler
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NativeSvgHandler - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'NativeSvgHandler' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
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
<translate> (introduced in <tvar
File:OOjs UI icon information-progressive.svg | <translate> This extension is included in the following wiki farms/hosts and/or packages:</translate>
<translate> This is not an authoritative list.</translate> <translate> Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here.</translate> <translate> Always check with your wiki farms/hosts or bundle to confirm.</translate> |
Categories:
- Pages with script errors
- Pages with broken file links
- Stable extensions
- Extensions without an image
- Media handling extensions
- Extensions with master compatibility policy
- Extensions with manual MediaWiki version
- Extensions supporting Composer
- GPL licensed extensions
- Extensions in Wikimedia version control
- All extensions
- SVG extensions