I'm using this answer to apply a drop shadow on a SVG element like a circle. I have a fill
attribute on my element to apply a background color on it, and now I'd like to combine all that with a background image on the circle.
I've tried using a <pattern>
but I can only have the background-image, or adding <feImage>
to my filter drop shadow but the filter doesn't work anymore.
Basically, what should I add to this code knowing my image can be found in /public/images/... :
<filter id="dropshadow" width="130%" height="130%">
<feGaussianBlur in="SourceAlpha" stdDeviation="3"/>
<feOffset dx="0" dy="4" result="offsetblur"/>
<feComponentTransfer>
<feFuncA type="linear" slope="0.1"/>
</feComponentTransfer>
<feMerge>
<feMergeNode/>
<feMergeNode in="SourceGraphic"/>
</feMerge>
</filter>
<circle cx="50%" cy="50%" r="49%" filter="url(#dropshadow)" fill="#f8f8f8" stroke="#e7e7e7" stroke-width="1px"/>