code: def image_path_processor_factory(path):
    
    def processor(line):
      markup = ".. image::"
      if line.startswith(markup):
        fname = line[len(markup):].strip()
        if not(fname.startswith("/") or "://" in fname):
          return "{} {}{}".format(markup, path, fname)
      return line
    return processor
docs: Processor for concatenating the ``path`` to relative path images