# Create an HTML fragment that
# contains an image
img_file_path <-
system.file(
"example_files",
"test_image.png",
package = "blastula"
)
img_file_html <-
add_image(file = img_file_path)
# Include the image in the email
# message body by simply referencing
# the `img_file_html` object
email <-
compose_email(
body = md(
c(
"Hello,
Here is an image:\n",
img_file_html
)
)
)
if (interactive()) email
Run the code above in your browser using DataLab