Extension:ImageFilter
![]() Release status: stable |
|
---|---|
Implementation | Link markup |
Description | Filters images marked as NSFW; filtering can be disabled by registered users |
Author(s) | Nx, Tim Starling |
Latest version | 1.2 |
MediaWiki | 1.43+ |
License | GPL |
Download | |
Example | https://rationalwiki.org/wiki/Help:Images#Image_filtering |
Translate the ImageFilter extension if it is available at translatewiki.net | |
The ImageFilter extension can prevent specific images from being rendered inline, similarly to MediaWiki:Bad image list. There is no option to allow the image on certain pages, but registered users can disable the filtering altogether.
Originally written for https://rationalwiki.org/ by User:Nx.
Usage
[edit]Put __NSFW__
on the description page of an image to filter it. Because the extension checks the source of the page only, this can't be in a template, but it can be inside a comment block so it doesn't appear on the rendered page.
Registered users can disable filtering using the checkbox in the Appearance/Files section of Preferences.
A listing of all image description pages tagged as NSFW can be viewed via Special:PagesWithProp and choosing the "imagefilter_nsfw" option from the "Property name" drop-down menu.
Download instructions
[edit]- Download and move the extracted
ImageFilter
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/ImageFilter
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'ImageFilter' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.