Replies: 0
Hi, I really love your plugin! 🙂
I have a little feature request though. Could you enable possibility to maintain width and height of the original img on the replaced svg?
I added this simple snippet to your original JS:
// Set svg size to the original img size
var imgWidth = $img.attr('width');
var imgHeight = $img.attr('height');
$svg = $svg.attr('width', imgWidth);
$svg = $svg.attr('height', imgHeight);
and it seems to work like a charm.
I am sure this would make lots of people lives easier since it is much easier to just will natural img width and height in WP editor than to write separate CSS to each svg.