It is possible to access files stored in foreign repositories, without needing to upload them to the wiki, by setting the $wgForeignFileRepos array. This feature offers several possibilities:
- ForeignAPIRepo accesses files from a remote MediaWiki installation, such as Wikimedia Commons, through its API
- ForeignDBRepo accesses files through a database, and is useful for creating wiki families
- FSRepo accesses files from a local folder
In all cases, one would be able to embed files into a page using ordinary image syntax and specifying the name of the file in the foreign repository. Note that some of the above implementations are still experimental, and might not be suitable for production sites.