eelbrain.fmtxt.Image.from_file

classmethod Image.from_file(path, name=None, alt=None)

Create an Image object from an existing image file.

Parameters
  • path (Union[Path, str]) – Path to the image file.

  • name (Optional[str]) – Name for the file (the default is os.path.basename(path) without extension.

  • alt (Optional[str]) – Alternate text, placeholder in case the image can not be found (HTML alt tag).