The Pug Automatic

MediaWiki image upload tip

Written September 9, 2007. Tagged Tips, MediaWiki.

I recently wanted a wiki, to collect some ideas with my girlfriend.

After trying several pieces of wiki software, I settled for MediaWiki, which also powers Wikipedia. I've found it mainly meets my needs, though I only need a small subset of its features.

One thing I don't like about MediaWiki is how convoluted it is to add an image to an article. To wit:

  • Visit the Special:Upload page
  • Use the upload form
  • Copy the destination filename
  • Visit/create the article
  • Insert wiki markup using the copied filename
  • Save the article

A lot of steps, and in a non-intuitive order. After asking for better alternatives on #mediawiki, I got a tip I thought I'd share. It's still convoluted, but much less so:

  • Visit/create the article
  • Insert wiki markup using whatever destination filename you want
  • Save (or preview) the article
  • In the saved article (or in a new tab from the previewed article), click the destination filename, which will be a red (=no such article) link
  • Use the upload form

Keep in mind that MediaWiki is particular about file extensions – if you'll be uploading a PNG, use the .png extension for your destination filename.