Embed SVG Altmetric Badges by default

Given the benefits of using SVG images (tiny file sizes, scalability, appearance on high DPI displays [eg most phones these days]), can the Altmetric badge embed code be updated to use SVGs?

I see that the main Altmetric pages (eg https://www.altmetric.com/details/2068207) use SVGs by linking to URLs like this one:


which is just the addition of "&svg" to the query string of the badge URL, so the API supports it, it's just a case of the embed JS needing this support.

A fallback to PNG could be offered for anyone using an ancient browser that lacks SVG support (eg IE 8 could be detected), but otherwise SVG support is widespread (https://caniuse.com/#search=svg). Implementing this resolves issues like https://help.altmetric.com/support/discussions/topics/6000052349 in one fell swoop.

Login or Signup to post a comment