Extension:AddImgTag
![]() Release status: betaCategory:Beta status extensions |
|
---|---|
Implementation | HookCategory:Hook extensions |
Description | Provides <img> tag for MediaWiki 1.43 and later versions. |
Author(s) | awajietalk |
Maintainer(s) | awajie, Zorua_Fox |
Latest version | 0.0.2 (2025-03-30) |
MediaWiki | 1.43+Category:Extensions with manual MediaWiki version |
PHP | 7.4+ |
Database changes | No |
License | GNU General Public License 2.0 |
Download | GitHub: Note: README |
|
|
image, html |
|
The AddImgTag extension allows you to use HTML <img>
tags directly in your wiki pages. This restores the <img>
tag that was removed in MediaWiki 1.42.
See the README file for detailed instructions on how to install, configure and use this extension.
Usage
Simply add the <img>
tag to your wiki pages:
<img src="https://example.com/image.jpg" alt="Example image" width="300" height="200" />
Configuration
You can control which image sources are allowed or blocked:
- $wgAddImgTagWhitelist: List of specific URLs that are always allowed.
- $wgAddImgTagWhitelistDomainsList: List of domains that are always allowed.
- $wgAddImgTagBlacklist: List of specific URLs that are always blocked.
- $wgAddImgTagBlacklistDomainsList: List of domains that are always blocked.
Example configuration in LocalSettings.php:
$wgAddImgTagWhitelistDomainsList = [ 'commons.wikimedia.org', 'upload.wikimedia.org' ]; $wgAddImgTagBlacklistDomainsList = [ 'example.com', 'untrusted-site.org' ];
See also
Category:Image extensions
Category:All extensions
Category:Beta status extensions
Category:Extensions in GitHub version control
Category:Extensions not in ExtensionJson
Category:Extensions with manual MediaWiki version
Category:Extensions without a compatibility policy
Category:Extensions without an image
Category:GPL licensed extensions
Category:Hook extensions
Category:Image extensions
Category:OutputPageParserOutput extensions