Given an SVG that references a PNG image using <image xlink:href="http://...
why can't I use the SVG as background image with CSS? If I call the SVG directly in the browser (tested with Chrome and Firefox), it shows me the SVG with the PNG and the debugging tools (Network tab) also show that the external graphic was called. Using an <object>
tag in HTML pointing to the SVG also works. What also works is embedding the PNG into the SVN using base64, that allows me to use the SVG a background image, but not if the image is a path. Test page, CSS, SVG and the image I am linking to in the SVG are all on the same server.
The functionality is documented in the SVG Integration specification
When you use SVG as a background image its functionality is that of an
animated image document
It therefore runs in secure animated mode.
And one of secure animated mode's restrictions is that external references are not allowed.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments