Codes to enable WebP uploads on WordPress
WordPress, by default, doesn’t allow you to upload WebP format images highlighting some security reasons. However, using the following code you can easily upload WebP images on your WordPress website – which in fact is also recommended on the Google PageSpeed or GTmetrix as Serve images in next-gen formats. Simply copy and paste the code to your theme’s functions.php.
Link to: Downloads