How to add SVG image to WordPress?

WordPress natively does not support SVG and hence it cannot be added via Visual Composer image element. But, you can use the Raw HTML element to add it.

To do this, upload the image via media uploader and grab its URL. Finally, add Raw HTML element with HTML code in image format and paste the URL in img src.

The code in Raw HTML element will look like:

<img src="URL_here" />

Please note: WordPress requires <xml> tag in SVG before uploading it via media uploader. If you do not have such tag, then you can edit the SVG file using any text editor and add following on the first line:

<?xml version="1.0" encoding="utf-8"?>