#' A Random Image
#'
#' This function returns a random image that can be passed into `renderImage` and `plotOutput`.
#'
#' @return an image
#'
#' @export
random_image <- function(){
l <- list.files(system.file("img", package = "shinipsum"), full.names = TRUE)
img <- normalizePath(sample(l, 1))
tmpimg <- paste(tempfile(), basename(img), sep = "-")
file.copy(img, tmpimg)
list(src = tmpimg)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.