InstantCommons is a MediaWiki feature that allows you to instantly insert any image from public domain media library to your MediaWiki website using same image insertion code you use on any MediaWiki page.
There is no need of installing any extension but you can set this feature up and working on your MediaWiki website by adding a line of code in LocalSettings.php file (located in your website’s root directory).
InstantCommons enabled MediaWiki installations cache commons content so that it is only downloaded once, and subsequent pageviews load the locally existing copy.
How To Enable Instant Commons?
To enable InstantCommons in MediaWiki version 1.16 or later, all you got to do is add the following line in LocalSettings.php file:
$wgUseInstantCommons = true;
For more details have a look over $wgUseInstantCommons. During the installation, MediaWiki installer asks you to whether to enable this feature.
When the feature is enabled, the MediaWiki starts to behave like a Wikimedia project, that is, if an image or other media file is referred to which exists on Commons, it can be included in a wiki page like a locally uploaded file by specifying its name.
Example: (Code format to use any image on MediaWiki page)
[[File:File_Name.png|thumb|Caption Text]] (Works both for local and commons image files)
In-case if you have a locally uploaded image file with same name then it will take precedence over Commons filenames.