upgrade mediawiki, lose image upload, recover

I upgraded mediawiki to latest stable. This was several months ago, and all seemed to be well.

Today I uploaded a screenshot – no actually, I tried to upload and screenshot and couldn’t figure out why I could not find the link or place to upload the image…

I put

[[image:screenshot.png]]

and the mediawiki code created the link, and then clicking on it invited me to create the page… But NOT to upload an image. I had a vague recollection of having to turn on uploading a long time ago.

It turns out this is fairly easy – you set:

$wgEnableUploads  = true;

in LocalSettings.php, which looks like:

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads  = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

Uploading the file worked, but threw an error, “Error Creating Thumnail!”. The image showed up full-size in the wiki article, but on the image page no thumbnail appeared. I verified that ImageMagick was present.

I found a solution on the internet that said to just comment out the line

$wgUseImageMagick = true;

so we have

#$wgUseImageMagick = true;

and everything works as before.

 

—doug