Encode the file in the base64 encoding, and add the media type. The data URI
can be used to embed data in HTML documents, e.g., in the src attribute of
the <img /> tag.
Usage
base64_uri(x, type = mime_type(x))
Value
A string of the form data:<media type>;base64,<data>.
Arguments
x
A file path.
type
The MIME type of the file, e.g., "image/png" for a PNG image
file.