Christoph Weigert
Christoph Weigert

Reputation: 73

SVG Image neither displayed by IMG nor Background Image

I can't get the SVG Image to disaply correctly in Google Chrome 34

Example

As you can see object and iframes are working. IMG and Backgroudn image aren't working.

IE11 and FireFox can display all 4 examples correct.

Upvotes: 0

Views: 110

Answers (1)

Robert Longson
Robert Longson

Reputation: 124039

The Chrome developers have chosen not to support the use of SVG fragments in images in order to protect user's privacy.

Because your SVG file only displays each shape if it is the target of a URL fragment (the part after # in the filename), nothing is displayed when Chrome strips out the fragment.

Upvotes: 3

Related Questions