Image functionality ported from pdf.js
function checkImagesForAlias(alias, images) {
    var cached_info;

    if (images) {
      for (var e in images) {
        if (alias === images[e].alias) {
          cached_info = images[e];
          break;
        }
      }
    }

    return cached_info;
  }