Support » Plugin: SVG Support » Sorry, this file type is not permitted for security reasons.

  • ResolvedPlugin Author Benbodhi

    (@benbodhi)


    In the recent releases of WordPress, there was changes made to the mime type handling to make sure that files have the extension they say they do (read more in this post).

    This poses an issue for SVG files without the <xml> tag in them.

    SVG is actually XML, and WordPress now requires us to have a line such as <?xml version="1.0" encoding="utf-8"?> in our SVG file when opened in a code editor. Some graphic software does remove this when saving/exporting our SVG.

    So, if you receive an upload error “Sorry, this file type is not permitted for security reasons.”, you simply need to open your SVG file in a code editor like sublime text and add the xml tag mentioned above to the first line and save. Then try uploading again.

    I will be looking into some way to avoid this issue if I can implement it into my plugin, but for the time being, this is the solution it seems.

    Thanks for your support and patience!

Viewing 31 replies (of 31 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi @tnchuntic
    This is a resolved thread, please start your own.

    You don’t even need that code in your SVG file anymore, so you could try removing it. It shouldn’t be displaying… which leads me to believe your SVG code may be messed up, but hard to tell without seeing it or your site.

    If you want to keep discussing, please start a new topic and I will happily help. There is a LOT of people who get notifications from this thread. (Sorry everyone).

Viewing 31 replies (of 31 total)
  • The topic ‘Sorry, this file type is not permitted for security reasons.’ is closed to new replies.