How to add an SVG image?

  1. Home
  2. Docs
  3. How to’s
  4. How to add an SVG image?

How to add an SVG image?

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" />

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"?>
Was this article helpful to you? No Yes

How can we help?