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.
1 2 3 4 5 6 7 |
function my_custom_mime_types( $mimes ) { $mimes['webp'] = 'image/webp'; return $mimes; } add_filter( 'upload_mimes', 'my_custom_mime_types' ); |