How to use a device camera in HTML5

When you would like to offer your visitors the opportunity to obtain access to their mobile phone’s camera you can use services like the Phone Gap service. This functionality nevertheless can also be obtained without 3rd party involvement. The below input grants your visitors immediate access to their mobile phone camera and photos. Interesting to know is the fact no additional form actions are needed to save the image because this ‘input’ works as a normal upload input field file. Please take into account though this particular device camera use is only compatible with and supported by iOs6+ and Android 3.0+.

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


Was this useful?