Forums

Unable to upload WMF clipart (8 posts)

  1. rajesh0228
    Member
    Posted 2 years ago #

    I am trying to upload a WMF clipart(the ones that're inserted in Word) for my post, but I get this message:
    File type does not meet security guidelines. Try another.

    I know that WMF is not in the list of image files that WP allows...so what's the workaround? Basically these WMF files are "emoticons" & I've to use them. But I never seen these "emoticons" being available in .jpg or .png formats.

  2. mrmist
    Forum Janitor
    Posted 2 years ago #

  3. rajesh0228
    Member
    Posted 2 years ago #

    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?

  4. mrmist
    Forum Janitor
    Posted 2 years ago #

    I believe it was introduced as a security measure.

  5. rajesh0228
    Member
    Posted 2 years ago #

    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?

  6. alism
    Member
    Posted 2 years ago #

    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?

  7. rajesh0228
    Member
    Posted 2 years ago #

    alism, I've already set the MIME type on the server. Or are you hinting at something else?

  8. alism
    Member
    Posted 2 years ago #

    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).

Topic Closed

This topic has been closed to new replies.

About this Topic