SVG Image Formatter

Neil Gardner's picture

I developed a new sandbox module at and demoed at to enable normal image fields to accept SVG files just like any other images and to display PNG alternatives for legacy browsers. It works with both the default Drupal image upload widget and Media 2's media browser widget.

I believe this will be a very handy module for Drupal 7 sites. Currently all modern browsers let you reference SVGs in img tags, (since Firefox 2 and IE9 so over 4 years), but Web developers keep using GIFs, PNGs and JPEGs for the kind of drawings, cartoons, diagrams, logos etc. to which SVGs are best suited, especially with responsive design where adaptive images may otherwise be required.

I'd very much appreciate others testings and reviewing this module. Try it out with SVG files saved from Inkscape, Illustrator, Google Drawings, OmniGraffle, Visio etc..

You will need ImageMagick installed for PNG alternatives and a working instance of IE8 to test it.