SVG Namespace prefix xlink for href on image is not defined

The <svg> element is missing the declaration of the xlink namespace, although it is used in the <image> elements. So just added like the following:

<svg height="1000" preserveaspectratio="xMidYMid meet" style="width: 100%; height: 100%; transform: translate3d(0px, 0px, 0px);" viewbox="0 0 1000 1000" width="1000"
    xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

SVG2 deprecated the xlink namespace for href attributes.. So in the future, changing xlink:href="https://stackoverflow.com/questions/59138117/..." to href="https://stackoverflow.com/questions/59138117/..." would be the better solution.

Leave a Comment