You can use <pattern> as a stroke, for example.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <pattern id="p1" patternUnits="userSpaceOnUse" width="32" height="32"> <image xlink:href="http://phrogz.net/tmp/alphaball-small.png" width="32" height="32" /> </pattern> </defs> <rect stroke-width="32" stroke="url(#p1)" width="200" height="200" fill="none"/> </svg>
A template can contain <svg> drawing elements or (as here) an image or both.
source share