Terminating app when using camera as file input in WKWebView

I'm building an ios app using WKWebView.

In HTML I'm using the following as file upload

<input type="file"  accept="image/*"  capture="environment"> 

but the app terminated with an error

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Source type must be UIImagePickerControllerSourceTypeCamera'

In the Info.plist i've added the Privacy - Camera Usage Description also for Microphone and Photo Library usage

Terminating app when using camera as file input in WKWebView
 
 
Q