WordPress - How To Enable SVG Support To Upload SVG Images

Описание к видео WordPress - How To Enable SVG Support To Upload SVG Images

View on website:
https://scottsweb.dev/enable-svg-supp...

Here's a quick code snippet to enable svg support on wordpress. Place this in functions.php of your theme (or child theme).

/**
Scottsweb.dev
Allow SVG support
*/
function swd_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'swd_mime_types');

Комментарии

Информация по комментариям в разработке