Scroll to top

How to add new file type to upload in wordpress?

Add new file type to upload in wordpress

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_filter('upload_mimes', 'add_file_types_to_uploads');

 

Get more information

Read More Posts

Leave a Reply

Your email address will not be published. Required fields are marked *