Vachmi

The <feImage> filter primitive fetches image data from an external source and provides the pixel data as output (meaning if the external source is an SVG image, it is rasterized).

Attributes

Attribute
Description
xlink:href
This attribute defines a reference to a resource as a reference IRI.
SVG 2 removed the need for the xlink namespace, so instead of xlink:href you should use href.
preserveAspectRatio
This attribute indicates how an element with a viewBox providing a given aspect ratio must fit into a viewport with a different aspect ratio.
As the aspect ratio of an SVG image is defined by the viewBox attribute, if this attribute isn't set, the preserveAspectRatio attribute has no effect (with one exception, the <image> element, as described below).

Here is the SVG code to draw this filter.

feImage filter
<svg id='path1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'>
 <defs>
  <filter id="image">
   <feImage xlink:href="../images/sunflower.png"/>
  <filter>
 <defs>
 <rect x="0%" y="0%" width="100%" height="100%" style="filter:url(#image);"/>
</svg>