11 Comments
  1. WP doesn’t support SVG by default due to security concerns. SVG can contain malicious code that can be used to execute attacks such as cross-site scripting. Since SVGs are XML-based, they can be manipulated in ways that are not possible with other image formats, making them a potential security risk if not handled properly.

    SVGs are usually more efficient than PNGs or JPG. So it’s not a speed issue at all.

    You can use a plugin to enable SVG support or build them into your theme depending on how you’re going to use them.

  2. An svg is basically code. Malware and shit can be embedded in code. The vast majority of WP users are clueless morons that want everything for free so it’s impossible to convince them that downloading random shit from the internet you find in Google isn’t necessarily a good idea. 

    So, the devs that build WordPress are mostly saving those clueless morons from themselves by making you jump through hoops to use svgs. 

  3. You can simply enable the SVG mime type with a couple lines in your functions file. Typically I do this only when uploading and then disable the function, as SVGs can contain malicious code. I prefer using a code snippet in the code snippets plugin as it can be toggled on and off as needed.

  4. Yes. There are a couple good plugins that sanitize them. I use them for logos and icons, mostly. Maybe background patterns.

  5. I find it retarded that it is not supported by default. Svg are big part of webdesign. “But security” well trust the administrator to know what he is doing. There are also other insecure options enabled by default. They should at east make it an option to enable with a warning….

  6. SVG is a potential attack vector, but as long as you’re the only one allowed to upload them, and you don’t upload SVG from uncertain sources, you’ll be fine.

    Best to use a SVG support plugin or custom code – and disable the SVG uploads when not needed.

  7. WordPress actually does support SVGs, but it’s disabled by default for security reasons. SVGs can potentially contain malicious code, so WordPress takes a cautious approach.

    However, you can enable SVG support through plugins or by adding code to your functions.php file. Just be sure to implement proper security measures if you do this.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer