Extracts the content URL for an image element from the raw API node.
By default the URL is returned as a string. Set download = TRUE to
download the image to a temporary file and return the file path instead.
The content URL is a short-lived signed URL issued by Google; it is valid for the duration of the current session but should not be stored permanently.
Only defined for image_element objects; calling on any other element type
errors with an informative message.
Value
A single character string: either the signed content URL
(download = FALSE) or an absolute path to a temporary file
(download = TRUE).
Examples
if (FALSE) {
ps <- register_presentation(id = "YOUR_PRESENTATION_ID", set_active = FALSE)
slide_obj <- on_slide_number(1, ps)
el <- get_elements(slide_obj, type = "image")[[1]]
# Get the signed URL
url <- get_image(el)
# Download to a temp file
path <- get_image(el, download = TRUE)
}