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:
Thanks for your support!
– Jon from Wiyre.com
Nguồn: https://dinhk.net/
Xem thêm bài viết: https://dinhk.net/category/cong-nghe/
11 Responses
does not Work for my last version wordpress V5.2.3 !
Worked for us! Thanks!
not Working
This doesn't work for me, any idea's why?
Yeah!!!! Instant knowledge gained on the fly! Thank Jon.
Your tutorial was concise, intelligible, and straight to the point. Keep it up!
Thank you so much. Great video and EASY to understand!
Thanks for the great help bro <3
It works perfectly, thanks
Hi, Like your video. Question: how do you mean with if you are worried for security of your website?
Thanks …
Thank you sir!
thank you