index.js
function crawlImages(result, $, endCallback) {

    if (! result.images) {
      return endCallback();
    }

    log.debug({"url" : result.url, "step" : "analyzeHTML", "message" : "CrawlImages"});

    async.each($('img'), function(img, callback) {
        crawlImage($, result, img, callback);
    }, endCallback);
}
function crawlImages(result, $, endCallback) {

    if (! result.images) {
      return endCallback();
    }

    log.debug({"url" : result.url, "step" : "analyzeHTML", "message" : "CrawlImages"});

    async.each($('img'), function(img, callback) {
        crawlImage($, result, img, callback);
    }, endCallback);
}
function crawlImages ( result , $ , endCallback ) { if ( ! result . images ) { return endCallback ( ) ; } log . debug ( { "url" : result . url , "step" : "analyzeHTML" , "message" : "CrawlImages" } ) ; async . each ( $ ( 'img' ) , function ( img , callback ) { crawlImage ( $ , result , img , callback ) ; } , endCallback ) ; }
Crawl image tags found in the HTML page

@param The HTTP response with the crawl options
@param the jquery like object for accessing to the HTML tags.
@param callback()
Crawl image tags found in the HTML page