P. M.
P. M.

Reputation: 15

SVG image not showing (many ways tried)

This is my code:

<svg class="navbar-brand" src="/Images/logo.svg" alt="Apps Architect"></svg>

I have tried changing svg to img or embed. With img image is not rendering but alternate text is showing. With embed image is not showing, alternate text neither. So I have changed:

xlink:href="data:img/png;base64,

to:

xlink:href="data:image/png;base64,

I've added div <div><img class="navbar-brand" src="/Images/logo.svg" alt="Apps Architect"></div>

I've change xlink:href instead of src.

Then I've tried to use:

<image ... xlink:href="...">

But it doesn't change anything.

EDIT: I've added width and height but it doesn't change anything. But it shows properly after compiling in Visual Studio. Only on the server it doesn't showing. I've added png file instead svg and it doesn't showing neither.

Upvotes: 0

Views: 4016

Answers (1)

P. M.
P. M.

Reputation: 15

I've found a solution in my path there was "/Images/logo.svg" and it should be "Images/logo.svg"

Upvotes: 1

Related Questions