code: function findImages(templateName, source, deps, options) {
    var imgReg = /(<img\s.*?src\s?=\s?['"])([^'"]+)(['"][^/>]*\/?>)/g,
      referenceReg = /[{}]/,
      result = null;
  
    // search source & add a dependency for each match
    while ((result = imgReg.exec(source)) !== null) {
      const src = result[2];
      const imageTemplateName = `${templateName}dep${deps.length}`;
  
      // skip this image if a) it has a dustJS reference in it or b) an optional excludeImageRegex matches
      if (referenceReg.test(src)) {
        log(options, `skipping image ${src} (src includes a DustJS reference)`);
        continue
      }
      if (options.excludeImageRegex && options.excludeImageRegex.test(src)) {
        log(options, `skipping image ${src} (src matches excludeImageRegex)`);
        continue;
      }
  
      log(options, `requiring image ${src}`);
  
      // do our own custom registration of a template-like function that will use require to get the actual path
      const srcTemplate = `(function() {
        var path = require('${src}');
        dust.register('${imageTemplateName}', body_0);
  
        function body_0(chk, ctx) {
            return chk.write(path);
        }
        return body_0;
      })();`
      deps.push(srcTemplate);
  
      // replace the original image path with a partial template call to our method that will return the path.
      const replace = `${result[1]}{>"${imageTemplateName}"/}${result[3]}`
      source = source.replace(result[0], replace);
  
      // update regex index
      imgReg.lastIndex += (replace.length - result[0].length);
    }
  
    return source;
  }
docs: Look for <img> tags and require the actual files