To upload SVG images, copy and paste the code below exactly as shown:
function cc_mime_types($mimes) {
$mimes[‘svg’] = ‘image/svg+xml’;
return $mimes;
}
add_filter(‘upload_mimes’, ‘cc_mime_types’);
In this guide I’ll show you how you can add a .svg image to your media folder form within WordPress. This is usually blocked by default because sometimes .svg images can pose as a security risk if they are uploaded maliciously. I would recommend that you allow .svg uploads only if you really need a .svg file – otherwise, stick with a .png or .jpg.
If you have any questions or need additional support, leave a comment below and I will try to help as best as I can.
View more tutorials like this: https://www.wiyre.com
Thanks for your support!
– Jon from Wiyre.com
Click to get Tutorial: How To Upload .svg Files To The WordPress Media Folder ====>>>
Optimize Graphics Hub Premium Membership
Ruben Campos
- EditYeah!!!! Instant knowledge gained on the fly! Thank Jon.
Your tutorial was concise, intelligible, and straight to the point. Keep it up!
Colleen Hurley
- EditThank you so much. Great video and EASY to understand!
UNNI BABU
- EditThanks for the great help bro <3
Dantros
- EditIt works perfectly, thanks
aleks Mam
- EditHi, Like your video. Question: how do you mean with if you are worried for security of your website?
Thanks …
Dee Lay
- EditThank you sir!
premier69
- Editthank you