Marius
Marius

Reputation: 59

How to add a .svg image inside of a rectangle using svg in vue

I am trying to add an svg image inside of a rectangle which should be positioned in the middle of the rectangle.

I want to add the test.svg local image from the "images" directory.This approach that I did works only with url path.

Is there a different way to make it work with local .svg files?

Later on I am going to have multiple svg files.

Fiddle: https://jsfiddle.net/zo8pyed9/2/

Upvotes: 0

Views: 181

Answers (1)

Majid Valizadeh
Majid Valizadeh

Reputation: 21

Your codes are correct but you don't use correct path for href attribute and it can't find your SVG files.

Upvotes: 2

Related Questions