SVG upload

PHOTO EMBED

Wed Sep 30 2020 12:02:11 GMT+0000 (Coordinated Universal Time)

Saved by @rstringa #php #functions

function add_file_types_to_uploads($file_types){
$new_filetypes = array();
$new_filetypes['svg'] = 'image/svg+xml';
$file_types = array_merge($file_types, $new_filetypes );
return $file_types;
}
add_action('upload_mimes', 'add_file_types_to_uploads');
content_copyCOPY

functions.php