WordPress - How To Enable SVG Support To Upload SVG Images
HTML-код
- Опубликовано: 6 окт 2024
- View on website:
scottsweb.dev/...
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');