PNG files on MediaWiki

From WolfTech
Jump to navigation Jump to search

On some installs of MediaWiki, PNG images will not upload correctly. This occurs because the MIME type of the image is not being read correctly - MediaWiki is interpreting them as text/plain when in fact they should be being interpreted as image/png. If your MediaWiki install has this problem, a simple solution to it would be to add the following line to the end of your LocalSettings.php file in the root of the wiki install:

$wgMimeDetectorCommand= "file -bi";