Issues

Issue #752 resolved

svg images are linked in a way browsers don't like

Dustin Mitchell
created an issue

If overview.svg exists, then {{{ .. image:: _images/overview.* :alt: Overview Diagram }}} turns to {{{ <object data="_images/overview.svg" type="image/svg+xml"><embed src="_images/overview.svg" type="image/svg+xml"></object> }}} using the HTML builder. In Firefox, this renders as an object needing a plugin (for which no plugin exists). On Chrome, the browser tries to download the images. On Safari, the images are displayed, but inside small boxes with scroll bars.

I think the much simpler <img src="_images/overview.svg"> would work, perhaps with a warning that older browsers do not adequately support SVG, and that bitmap-based formats should be used instead where extreme browser compatibility is important.

Comments (5)

  1. Benoît Allard

    On a similar note, the graphviz extension also link SVG that way. From the page where the original SVG patch comes from:

    I had to use the object tag because Firefox can’t render SVG with the img tag. Read more about cross browsing SVG issues

    Which was end of 2009 and is far from true now. I propose that every SVG inclusion should now use the img tag.

  2. Log in to comment