Noticing that my svg files are not showing on desktops unless I use the text editor module. When viewing on my iPhone 5, they show up just fine in several instances: photo & call out modules + text editor.
I tried creating a new page on your site, added one of your SVG images using the native WP editor, and it seems the same problem is happening. Chances are, the problem is with WP in general. Can you try deactivating all plugins and see if the same problem is happening on the native WP editor?
All plugins are deactivated and I can not get the svg files to show up in BB modules. However the text editor does work. See the Safeway logo here: http://wendywood.flywheelsites.com/clients/. The second column also has the Safeway logo within the photo module and it only show on my iPhone and Safari
How are you even able to upload SVG files to your site, as I was of the understanding that WordPress doesn’t support the option to upload .svg files for security reasons?
Have you added the MIME type via a custom function?
Yes, uploading is just fine. Did you see the links sent over previously with screenshots of the svg files in different browsers? In addition, here is my website: http://www.aedesignco.com/expertise/ This page uses all svg files and looks fine on desktop, but missing on mobile.
I’m not sure how to do this: “MIME type via a custom function”.
When you say they upload just fine, have you added any custom code to support the upload of .svg? As out-the-box, WordPress doesn’t support the option to allow uploads of .svg due for security reasons. If you can upload an .svg, apparently it may not display.
I think your issue could be related to this. Therefore, I recommend you either install a plugin that provides support for .svg files or read this article.
So the conclusion as it seems is this: there is no issue succsessfully uploading svg files to the media library or using the svg via the text editor using this script. However, trying to use svgs with any of the Beaver Builder modules is unsuccessful.
Can you try using the same SVG images on the native WP editor, i.e., on a page without using the BB page builder? I’m thinking the problem is with WP in general and not something specific to BB.
Its not an issue with WP. That works even when using the text editor module: http://wendywood.flywheelsites.com/clients/. Its when trying to use svgs in any of the Beaver Builder modules. I’ve already granted access to the site if you wanted to look around. Its in a private message reply from previous.
It seems that we are at the same resolution that I concluded previously. Its just not possible to use svg using Beaver Builder advanced modules. I have successfully added them without any additional mark up simply by inserting an image from the media library using the text editor. Please confirm. Thanks!
No without that markup, I am not able to view one of your svg files using the add media option via the native WP editor. I have recorded myself on your site adding an svg from you library and when I view the page, it doesn’t display.
I always scale my images down using CSS anyways. So I had added a class called “icons” to the rows where my svg files lived. Then, using the BB text editor module, added the svg via the insert from media library. And of course set the css to:
.svg does not work with Beaver Builder modules Add some code to your config and then you can upload them to your library successfully. Use the text editor to add your svg and makes sure to resize it with CSS for it to show on all browsers.
Thanks for sharing, but your post above isn’t entirely accurate. This isn’t an issue with our BB modules. I demonstrated that this issue also occurs in the WordPress editor for a page or post.
Out-the-box, WordPress does not allow the upload of .svg files for security purposes. If you do manage to get one uploaded, it is likely not going to display. To add support you either need to install a plugin that provides this functionality or use filter in your child themes functions.php file.
Once you have completed the above, you will then need to include some custom styling to target .svg files giving them a width and height. Upon completing these steps, there is no problem with .svg displaying in either the WordPress editor or our BB modules.
Sorry for all the back and forth on this. I did add the following filter in the functions.php file, added custom styling in my CSS and was able to get the svg to load perfectly using the text editor but never one of the BB modules. Can you provide a sample of this functioning somewhere or let me know what step I am missing to get all of this to work with BB?
Are you saying that I need to target svg specifically with CSS. If so, do you have a sample. What I am targetting above is a svg file. Thanks again! Really appreciate your time.
I added similar code to yours via my child themes functions.php file. I then added the following CSS to target .svg files. I added the code in a previous response as well. You must have missed it
img[src$=".svg"] {
width: 100% !important;
height: auto !important;
}
I then add one of your svg to a Photo module and the svg displays as intended.
So the issue was that you were sizing your svg using the icon CSS you added, but this wasn’t being applied to a module when you tried your svg there.