8808 shaares
198 private links
198 private links
You can put the capture attribute on inputs with the type of file, and you can give it a value of “user” or “environment“. The interesting thing about the capture attribute is for users coming to your website on a mobile device. If they interact with that input, instead of opening up the default file picker, it will actually open up one of their cameras.
Read the reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture