Wikimedia Foundation CTO Brion Vibber recently added a very neat feature to the development version of MediaWiki. In order to enable it, all you need is a snippet of code in your LocalSettings.php configuration file:
$wgForeignFileRepos = array( 'class' => 'ForeignAPIRepo', 'name' => 'shared', 'apibase' => 'http://commons.wikimedia.org/w/api.php', 'fetchDescription' => true, // Optional );
Your wiki installation will now have full access to Wikimedia Commons in the same way any Wikimedia wiki does. You can embed image thumbnails of any size, and they will be automatically generated and loaded from Commons. You can click images and see the file description (including the wiki description page, file history and EXIF metadata) loaded from Commons. I haven’t tried to make the embeddable video/audio player work yet, but any file type will be accessible.
This is wonderful, because it makes the nearly 3 million freely licensed files in Commons easily accessible to potentially thousands of wiki users, while retaining the critical licensing information. This implementation does not cache the data in the local wiki, so is not yet suitable for large scale installations. Caching the data intelligently is a significant challenge, as it could be a vector for denial of service attacks and also raises the questions how/when cached files should expire, etc. I wrote a proposal called “InstantCommons” a couple of years ago which included some notes on the issue. After an incomplete first implementation of InstantCommons, I’m glad that we now have a working, simple mechanism for third party use of Commons media. Given that the foreign repository can be any MediaWiki installation, it will also be interesting to see what other wiki-to-wiki exchanges might result from it.
June 2, 2008 at 11:11 am
I might seem selfish, but this will be adding to wikimedia’s bandwtich expenses
June 2, 2008 at 12:14 pm
Can you turn off the curly quotes?
June 2, 2008 at 12:50 pm
And it works… Erik, since you’ve gone in as deputy director technical features that have been talked about for years are now finally getting done. I don’t know if it’s a coincidence or not, but if not thank you.
June 2, 2008 at 5:06 pm
Awesome! That’s incredibly for the hint. I’ll be thrilled to be using this.