[ad_1]
I think theres a reason why wordpress doesnt support SVG on default anyone knows whats the reason? Does SVG’s slowdown websites?
[ad_2]Copyright © 2020 - 2022, Project DMC - WordPress Tutorials for Beginners- All Rights Reserved. Privacy Policy
Plugin called SVG Support
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.
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.
https://css-tricks.com/snippets/wordpress/allow-svg-through-wordpress-media-uploader/
Add the first block of code to your functions.php file to allow svgs or add the plugin mentioned above.
Svg’s are not slow but can cause a security issue so they are not allowed by default but so long as you made the svg or trust where you are getting it from there shouldn’t be any issues.
Try googling next time, this was literally the first entry
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.
WebP is good enough and widely supported right now.
Yes. There are a couple good plugins that sanitize them. I use them for logos and icons, mostly. Maybe background patterns.
I use a safe SVG plug-in and then use it site logos typically
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….
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.
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.