Although, at least some browsers (mobile Safari in particular I know does this) allow you to directly take a picture when prompted to upload a file. It’s up to your device and browser whether to prompt for this, so it’s worth trying different browsers and looking into device settings.