If you want to capture a image with the camera on your device (desktop or mobile), you need a specific input element.
<input type="file" id="theImageFile" capture="user" accept="image/*">
You can check the ‘Image uploader’ widget but i am not sure if this will be able to use the ‘capture’ feature.
You can change this HTML attribute with the ‘Accessibility Helper’ utility from the Mendix Marketplace.
Or you can use a preconfigured widget from the marketplace like this one: