Skip to main content

read_image_file

Function read_image_file 

Source
pub async fn read_image_file<P: AsRef<Path>>(file_path: P) -> Result<ImageData>
Expand description

Reads an image file from the local filesystem and converts it to base64 format.

Validates the path for traversal attacks and checks the file extension against a supported set. Max file size is 20 MB.