When I upgraded two of my MediaWiki installations[1, 2] a while ago, images were no longer being displayed. I found out that this was due to some problem with a change to the image.image_name column.

Gladly, the fix was easy (adopted from the message in the mailing list):

ALTER TABLE image ADD COLUMN img_name2 varchar(255); 
UPDATE image SET img_name2=img_name;
UPDATE image SET img_name=img_name2;
ALTER TABLE image DROP COLUMN img_name2;