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;
  }
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;
  }
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 ; }
Image functionality ported from pdf.js
Image functionality ported from pdf . js