Quoting from a post on Meta.SE:
Stack Exchange supports image uploading by using an external service (imgur) which does not support vector images.
Imgur does not support the SVG format. They have an open feature request for such support.
If your SVG image is hosted elsewhere, you can embed it in the post using HTML:
<img src="https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg"/>
Produces: