mrmist, while thanking you for this link mind explaining why a self-hosted WP should have such file-type restrictions? It’s bizarre to the say least!
Why is WP making our lives more difficult than what it already is?
I believe it was introduced as a security measure.
mrmist, i made a one line addition to functions.php –
if ( !$mimes ) {
// Accepted MIME types are set here as PCRE unless provided.
$mimes = apply_filters( ‘upload_mimes’, array(
‘wmf’ => ‘application/x-msmetafile’,
‘jpg|jpeg|jpe’ => ‘image/jpeg’,
‘gif’ => ‘image/gif’,
I made no other changes.
But the problem is that after uploading(without that error), from Upload New Media, the image is not being displayed at all. In the editor only the filename is being displayed.
What to do?
I’m not sure that wmf files are particularly web friendly, so you might want to consider converting them to something else and save yourself a load of hassle.
It’s a Windows format, so while it’ll probably display OK in IE, I’d guess you’d probably need to install software to view them on other OS’s and with more standards based browsers like Firefox and Chrome you might need a plugin etc.
You might also need to set the MIME type on the server to ensure it’s being served correctly too?
alism, I’ve already set the MIME type on the server. Or are you hinting at something else?
Just throwing ideas out there really. Looked like you’d set the type for uploading above, but wasn’t sure the server was actually serving it correctly. (There’s a MIME Types option in CPanel if you use that, not sure about other server setups).