Ok, I found the answer. What I did is add filter to my svg:
<filter id = "i1" x = "0%" y = "0%" width = "100%" height = "100%"> <feImage xlink:href = "birds.png"/> </filter>
and in the circle add the attribute:
circle.setAttribute('filter','url(#i1)');
shay levi
source share