image_encode_base64: Read image file and encode it to base64

View source: R/utils.R

image_encode_base64R Documentation

Read image file and encode it to base64

Description

Read image file and encode it to base64

Usage

image_encode_base64(image_path)

Arguments

image_path

The path to the image file.

Value

A base64 encoded string.

Examples

image_path <- file.path(system.file("extdata", package = "ollamar"), "image1.png")
substr(image_encode_base64(image_path), 1, 5) # truncate output

ollamar documentation built on April 3, 2025, 8:31 p.m.