By default, WordPress does not allow its users to upload SVG files for security reasons. It generates an error message while we are trying to upload an SVG file.

But, you might need to upload SVG files for your site. By adding the following lines of code into the currently activated theme’s function.php file, you can easily allow WordPress to upload SVG files. Here goes the code.
function sharai_khana_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'sharai_khana_mime_types');
I hope that helps you. Please add your comment or feedback if you have any specific questions.
Total 0 Votes
0
0