async function analyzeImage(body, context) {
    phantomas.log("Starting analyze-image on %j", context);
    const results = await analyzer(body, context, {});
    phantomas.log("Response from analyze-image: %j", results);

    for (const offenderName in results.offenders) {
      phantomas.log(
        "Offender %s found: %j",
        offenderName,
        results.offenders[offenderName]
      );

      const newOffenderName = offenderName.replace("image", "images");
      phantomas.incrMetric(newOffenderName);
      phantomas.addOffender(newOffenderName, {
        url: context.url || shortenDataUri(context.inline),
        ...results.offenders[offenderName],
      });
    }
  }
Adds Responsive Images metrics using analyze-images npm module.

Run phantomas with --analyze-images option to use this module