code: function loadImage(title, imageURI) {
    var img = new Image();
    img.src = imageURI;
    var deferred = when.defer();
    img.onload = deferred.resolve;
    return deferred.promise.then(function() {
      return {
        title: title,
        image: img,
        imageUrl: imageURI,
        imageWidth: img.width,
        imageHeight: img.height
      };
    });
  }
docs: Load a data URI and wait for it to load, returning an item. All of this is because data URI's don't load instantly, and we need to load the image in order to pass its dimensions. Alternative solution: just hardcode 26x26.