Hi there,
Thanks for using my plugin!
I use it with Divi a lot and have never had to do this. The image usually fills the width of the column it is in…
Maybe there is something else conflicting, or are you using a child theme that plays with image styles at all?
Either way, if you have to set a width for whatever reason, the way you e done it is fine.
Another way is to set all your image modules to have the same styles in your child theme stylesheet or the Divi custom CSS, avoiding having to put code in every image module.
Adding the style-svg class will only allow my plugin to target the img tag and swap it with inline SVG code which isn’t necessary unless you need to inline that code… that’s not standard practice, it’s just to animate/style elements within the SVG itself.
I hope this helps.
Nope. I’m just using the barest of child themes for Divi. It’s just odd. Perhaps something else is conflicting.
Interestingly, just saw this posted to a Divi Facebook Group I follow — perhaps this is related to the issues I’ve been seeing. The author notes he’s shared it with you, but just in case…:
“I’ve been playing around with using inline svg’s and used SVG Support by Benbodhi. Sadly the plugin wasn’t affecting svg images added in most of Divi’s modules.
I ended up tinkering with the plugin to find a workaround and added the additional functionality that could prove handy for others. If anyone is interested the modified version is available on GitHub. (I have also shared this info with the original author and hopefully)”
https://github.com/ipokkel/svg-support
Hi,
I think your issue is slightly different as it isn’t to do with using the class to inline the SVG.
But I have indeed been contacted about this and will be looking at the code and considering implementing it or similar when I get a chance.