The <feImage>
SVG 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.)
Categories | Filter primitive element |
---|---|
Permitted content | Any number of the following elements, in any order:<animate> , <animateTransform> , <set>
|
class
style
externalResourcesRequired
This element implements the SVGFEImageElement
interface.
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feImage xlink:href="/files/6457/mdn_logo_only_color.png"/> </filter> </defs> <rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);"/> </svg>
Specification | Status | Comment |
---|---|---|
Filter Effects Module Level 1 The definition of '<feImage>' in that specification. | Working Draft | Added href attribute and deprecated xlink:href . Added crossorigin attribute. |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of '<feImage>' in that specification. | Recommendation | Initial definition |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 4 | Yes | 9 | ? |
href |
Yes | Yes | Yes | Yes | Yes | ? |
preserveAspectRatio |
? | ? | ? | ? | ? | ? |
xlink:href
|
Yes | Yes | 4 | Yes | 9 | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | ? | Yes | Yes | Yes | ? | ? | ? |
href |
? | Yes | Yes | Yes | ? | ? | ? |
preserveAspectRatio |
? | ? | ? | ? | ? | ? | ? |
xlink:href
|
? | Yes | Yes | Yes | ? | ? | ? |
<filter>
<animate>
<animateTransform>
<set>
<feBlend>
<feColorMatrix>
<feComponentTransfer>
<feComposite>
<feConvolveMatrix>
<feDiffuseLighting>
<feDisplacementMap>
<feFlood>
<feGaussianBlur>
<feMerge>
<feMorphology>
<feOffset>
<feSpecularLighting>
<feTile>
<feTurbulence>
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feImage