SVG vector image backgrouns for page and sliders

Asked on January 16, 2016 in How To.

I have been encountering problems trying to run .SVG files instead of .jpg or png or gif. however I can’t seem to get the editor to accept the file type, and i can not seem to get anything to work within my layers pages (particularly in my sliders)

I have purchased Layers Pro and StoreKit for layers, and niether seems to work with the SVG-Support plugin. Even when I customize website content and change the class to the “style-svg” class. I would like to be able to use designated background images that are svg files in the slider editor, however it doesn’t seem to work! 🙁 heres a link to a screenshot of the editor and the problem I am having. Should I just paste the inline svg css created from illustrator and paste in into the “insert code” area…

I’ve tried selecting the SVG files in the Sliders background, featured, and custom css and nothing seems to let them work. I also tried customizing the class name for the slider to “style-svg” as recommended by the other plugin, I the problem is easy to fix please help.
Thanks,
Logan


innatedes Layers User

I forgot to mention I also have SVG-Support Plugin that helps turn the svg files into css code. And it is very easy to use, I am having trouble using it in layers though!

on January 16, 2016.
Reply
1 Answer(s)
Answered on January 20, 2016.

Hi there,
Images are handled by WordPress and the mime type defined by your server and read by your browser – not all browsers support SVG.- Layers does nothing special to enable or prevent SVG usage.  You must ensure it is supported by the server (ie mime type enabled), and then enabled for WordPress:
https://css-tricks.com/snippets/wordpress/allow-svg-through-wordpress-media-uploader/

You might be interested in this thread which talks about SVG challenges in WordPress in general:
https://wordpress.org/support/topic/could-not-display-svg

and
http://blog.secupress.fr/en/add-svg-support-in-wordpress-medias-yes-but-no-380.html

Reply