This seems to work very well for filtering image
type
for file-uploads
<input type="file" accept="image/*">
Ref Thread : File input 'accept' attribute - is it useful?
and this seems to work only on Chrome :
<input type="file" name="imagefilename" accept="image/x-png, image/gif, image/jpeg" />
Ref thread : How to allow <input type="file"> to accept only image files
Question : I understand there are ways to validate the image extension using jQuery or Server side....but has anyone come across any attribute, which can filter image through pure html5 way, by adding something in input type="file"
section, which if not cross-browser, then atleast supports standard browsers like opera
,moz
,chrome
,safari
and IE9+
????
Please note i am asking for PURE HTML way.....no workarounds or hacks!!
Reason for asking : Referred threads are pretty old and i couldn't find much helpful stuff on google....may be someone knows something...!! :)