file input only images
<input type="file" name="myImage" accept="image/x-png,image/gif,image/jpeg" />
only accept image file input
<input type="file" name="myImage" accept="image/*" />
html make file input only images
<input type="file" accept="image/*">
Source: stackoverflow.com