[spip-dev] SVG, le retour éternel

Hola

Vu que les SVGs vont être considérés dans le prochain épisode
https://core.spip.net/issues/2970

Et qu'ils peuvent fallbacker en PNG facilement avec

<foreignObject>
      <img src="thoughtful-logo.png" >
</foreignObject>

http://thoughtfulweb.com/thoughts/on/the-best-way-to-add-an-svg-image-to-your-website

Je voulais faire un plugin, mais je n'ai sait pas où il faut creuser et quoi surcharger.

Quelqu'un pourrait m'aiguiller ? Par où commencer ?

Gracias

A +

Seriously? Personne ? :frowning:

Bon, au ca où ça pouvait aider quelqu'un j'ai fai un hack crados

Un JS

     $('img.switchtosvg[src*="png"]').attr('src', function() {
         return $(this).attr('src').replace('.png', '.svg').removeAttr{"width","height");
     });

La class

[(#LOGO_SITE_SPIP|inserer_attribut{"class","switchtosvg"})]

Et je mets un siteon0.svg à côté de l'autre dans IMG