smelt.image¶
Tier: Host — Available in every runtime, including headless mode.
Image file detection and base64 data-URL loading.
smelt.image.data_url_from_bytes¶
Encode raw bytes as a base64 data: URL with the given mime type.
smelt.image.is_image_file¶
Return true if p looks like an image file (matched by extension/sniffing).
smelt.image.read_as_data_url¶
Read the image at p and encode it as a data: URL. Returns (url, nil) on success or (nil, err_string) on failure.