html file get only images code example Example: accept only image files upload html <input type="file" name="myImage" accept="image/x-png,image/gif,image/jpeg" />