index.js
function crawlImage ($,result, img, callback) {
      var parentUrl = result.url;

      var link = $(img).attr('src');
      var alt = $(img).attr('alt');
      if (link) {
          var linkUri = URI.linkToURI(parentUrl, link);
          pm.crawlImage(parentUrl, linkUri, alt, function(){
            addLinkToQueue(result, parentUrl, linkUri, null, null, callback);
          });
      }
      else {
        callback();
      }
}
function crawlImage ($,result, img, callback) {
      var parentUrl = result.url;

      var link = $(img).attr('src');
      var alt = $(img).attr('alt');
      if (link) {
          var linkUri = URI.linkToURI(parentUrl, link);
          pm.crawlImage(parentUrl, linkUri, alt, function(){
            addLinkToQueue(result, parentUrl, linkUri, null, null, callback);
          });
      }
      else {
        callback();
      }
}
function crawlImage ( $ , result , img , callback ) { var parentUrl = result . url ; var link = $ ( img ) . attr ( 'src' ) ; var alt = $ ( img ) . attr ( 'alt' ) ; if ( link ) { var linkUri = URI . linkToURI ( parentUrl , link ) ; pm . crawlImage ( parentUrl , linkUri , alt , function ( ) { addLinkToQueue ( result , parentUrl , linkUri , null , null , callback ) ; } ) ; } else { callback ( ) ; } }
Extract info of an image tag & send the info to the plugins


@param The HTML body containing the link (Cheerio wraper)
@param The http response with the crawl options
@param The image tag
@param callback()
Extract info of an image tag & send the info to the plugins