def image_path_processor_factory(path):
  """ Processor for concatenating the ``path`` to relative path images """
  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
Processor for concatenating the ``path`` to relative path images