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 (Path | str) – Path to the image file.

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

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