code: function imageFilter (item /*{File|FileLikeObject}*/, options) {
        var type = '|' + item.type.slice(item.type.lastIndexOf('/') + 1) + '|';
        if ('|jpg|png|jpeg|bmp|gif|'.indexOf(type) === -1) {
          var err = new Error('File extension not supported (' + type + ')');
          vm.onUploadFinished(err);
          throw err;
        }
  
        return '|jpg|png|jpeg|bmp|gif|'.indexOf(type) !== -1;
      }
docs: Set up filters to check that images should be uploaded before uploading them Filters out the items that are not pictures