loli
loli

Reputation: 405

Embedding SVG image into a webpage: different behaviour in FF

I've just been trying to embed a simple animated SVG image into a HTML web-page with mixed success. After exploring the web a bit, I've found a number of ways to do it and included some in the following example: http://www.theinsanewonderland.com/loli/mekakucityactors/index_test.html

But on my Firefox (v.31, 64bit, Ubuntu) the behavior is quite inconsistent:

Does someone have any experience with this and can explain the differences? And do you observe the same effects with other browsers?

PS: Just tried Chromium, where everything works fine and consistent.

Upvotes: 0

Views: 72

Answers (1)

Robert Longson
Robert Longson

Reputation: 124029

When used as an image i.e. a CSS background or via an <img> tag an SVG file must be complete in a single file. You need to embed the jpeg background image file as a data uri within the SVG file itself.

The animation problem is an example of bug 1067375 which I fixed a while ago. The fix will appear in Firefox 35 which will be released on 12th of January. You can download an early beta release of that now if you like.

Upvotes: 1

Related Questions