Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский
Shared uploads: $wgUseInstantCommons
Enable InstantCommons, i.e. the use of Wikimedia Commons as a shared repository
Introduced in version: 1.16.0 (r58652)
Removed in version: still in use
Allowed values: boolean
Default value: false
Other settings: Alphabetical | By function


Add the following to your LocalSettings.phpManual:LocalSettings.php:

$wgUseInstantCommons = true;


Setting this variable to true enables InstantCommons, which allows to automatically use in the local wiki images hosted in Wikimedia Commons.

This setting is a shorthand for the following setting to $wgForeignFileReposManual:$wgForeignFileRepos:

$wgForeignFileRepos[] = array(
   'class'                   => 'ForeignAPIRepo',
   'name'                    => 'wikimediacommons',
   'apibase'                 => '',
   'hashLevels'              => 2,
   'fetchDescription'        => true,
   'descriptionCacheExpiry'  => 43200,
   'apiThumbCacheExpiry'     => 86400,


Enabling this parameter does not avoid any usage of disk space on the server running the local wiki. This setting does indeed generate thumbs on the local disk for caching purposes. In case the dimensions of the original file on Wikimedia Commons are exceeded when embedding the file on a page in the local wiki the file will in its original size be put onto the local disk.

See also[edit]