
If you receive the error ‘Sorry, This File Type Is Not Permitted For Security Reasons’ when uploading a .webp file then this code will solve the problem.
Add the following code to your functions.php file in your themes folder.
function my_custom_mime_types( $mimes ) {
$mimes['webp'] = 'image/webp';
return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );











