Skip to main content

image_block_from_file

Function image_block_from_file 

Source
pub fn image_block_from_file(path: &Path) -> Result<ContentBlock, String>
Expand description

Helper to create an image content block from a file path.

Reads the file, base64-encodes it, and infers the media type from the file extension.