In modern browsers, SVG static images can be inserted just like normal web images (JPG, PNG or GIF). However, if they contain animations or hyperlinks of any kind, including the SnipSVG embedded video links, you need to wrap the SVG image reference in an <object> tag.
Static SVG images are handled like regular images by current browsers. Just use a regular <img> tag or your web editor's standard Insert Image tool.
To do this you need to wrap the SVG image reference in an <object> tag with a special syntax. In SnipSVG you can get the code snippet for this with your SVG image name directly in the Save As... dialog.
1.Select Save As... in the Edit menu (even if the image has already been saved).
2.Click on the HTML Code button if the code isn't visible.
3.Select Full Size or Responsive, then Copy to get the code.
The basic syntax is quite simple:
<object type="image/svg+xml" width="67" height="118" data="SwitchButton.svg">
<img width="67" height="118" src="SwitchButton.svg">
</object>
OR
<object type="image/svg+xml" width="100%" data="SwitchButton.svg">
<img width="100%" src="SwitchButton.svg">
</object>
Object tag wrapper attributes
| type: | image/svg+xml |
| data: | <path> + filename |
| size: | Absolute width="xx" and height="xx", or width only with percentage value for responsive |
Wrapped img tag attributes
| size: | Same as object tag |
| src: | <path> + filename |