0:00
Hello everyone, welcome to Key2 blogging and in this video I will show you how we can enable
0:04
SVG file upload in your WordPress website. So by default WordPress doesn't allow us to upload SVG
0:12
file in WordPress. So to show you let me just upload a SVG file. So click on the SVG file
0:22
and as you can see the SVG file is blocked by the WordPress and it is showing this file type
0:29
is not permitted due to security reasons. So you can easily bypass this by adding a PSP code
0:36
in your theme editor. So you can enable SVG upload in WordPress using two methods
0:42
One is through plugin. So go to plugin and click on add new and search for allow SVG
0:52
And click on any of the plugins. So I will prefer this SVG support. So click on install now
1:07
and now activate this plugin. Now go to the media library again and let's upload a SVG file now
1:16
So this is the SVG file and as you can see the SVG file is uploaded successfully
1:27
Or you can implement SVG upload without using a plugin. So let me just disable the plugin
1:38
So this is the SVG support plugin. So I am disabling this plugin now
1:44
And now go to the appearance section and click on theme editor
1:49
Now you have to select the function.php file which is the theme functions
1:56
And scroll down and you have to copy the code from here. And I will leave the
2:04
code link in the description. So paste this code below it and click on update file
2:14
Or if you don't want to add this in function.php then you can use a code snippet plugin like
2:22
this. Here you can click on add new and you have to paste this code here
2:28
So let's check if this is working. So click on add new and now select a SVG image again
2:39
And as you can see we have uploaded SVG image without adding a plugin
2:44
And this function file will do the job for you. If you have any doubt regarding upload of SVG
2:51
file in WordPress then you can ask me in the comment section. And if this video helped you
2:56
then give it a like and subscribe to my channel for more upcoming videos like this. Thank you