PNG files on MediaWiki

From WolfTech
Revision as of 16:06, 14 March 2008 by Rjhodson (talk | contribs) (New page: 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/pl...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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";