Add a background image (.png) to a SVG circle shape

An image fill for an svg element is achieved through SVG Patterns

<svg width="700" height="660">
  <defs>
    <pattern id="image" x="0" y="0" patternUnits="userSpaceOnUse" height="1" width="1">
      <image x="0" y="0" xlink:href="https://stackoverflow.com/questions/11496734/url.png"></image>
    </pattern>
  </defs>
  <circle id='top' cx="180" cy="120" r="80" fill="url(#image)"/>
</svg>

Leave a Comment