Just for info. I get the same error now too.. I was using and uploading WebP images all the time but now over night the file upload dont work anymore and I get the same error!
The file upload however is working with the solution which @jkolaa provided. But this can’t be a permanent state.