SVG: <use href> does not render all svg elements

Copper Contributor

Description:
Using <use href="..."/> to reference an external svg within an svg sometimes results in an incomplete rendering.

 

Reproduction steps:

1. Download azure sample svgs from (https://learn.microsoft.com/en-us/azure/architecture/icons/)

2. Host a simple index.htm referencing the VM svg icon

<html>
<body>
<svg>
<use href="10021-icon-service-Virtual-Machine.svg#fd454f1c-5506-44b8-874e-8814b8b2f70b"/>
</svg>
</body>
</html>

3. Browse the page

 

Expected:
Icon is fully displayed. Works on firefox f.e.

tstollenwerk_0-1681247514061.png

 

Actual:
In Edge (and Chrome) only the polygon part is rendered. 

 

tstollenwerk_1-1681247542148.png

Not using <use> to display the svg image works fine. 

 

  • Edge: Version 112.0.1722.34
  • OS: Windows 11 Pro Version 10.0.22621 Build 22621

Any help or a workaround hint would be appreciated.

 

Thanks in advance and best regards

Thomas

 

0 Replies