Skip to content

ImageFile

Bases: BaseModel

Image metadata for content rendered by the site.

If both pixel dimensions are omitted, the rendered image uses its original size. If only one dimension is provided, the other is inferred to preserve aspect ratio.

Attributes:

Name Type Description
path Path

Image file path relative to the project root.

caption str

Caption text displayed with the image. Defaults to "".

pixel_width int | None

Desired rendered width in pixels, if overriding the source image. Defaults to None.

pixel_height int | None

Desired rendered height in pixels, if overriding the source image. Defaults to None.