renderImage
无法正常工作。当图像在本地计算机上时,它可以工作。
output$myImage <- renderImage({
pfad <- "https://www.rstudio.com/wp-content/uploads/2014/03/blue-125.png"
list(src = pfad,
contentType = 'image/png',
width = 400,
height = 300,
alt = "This is alternate text")
}, deleteFile = F)
imageOutput("myImage")
答案 0 :(得分:4)
您可以直接在ui或反应式上下文中使用tags$img
:
library("shiny")
ui <- fluidPage(
fluidRow(
column(
6,
tags$img(src = "https://www.rstudio.com/wp-content/uploads/2014/03/blue-125.png")
),
column(
6,
uiOutput(outputId = "image")
)
)
)
server <- function(input, output) {
output$image <- renderUI({
tags$img(src = "https://www.rstudio.com/wp-content/uploads/2014/03/blue-125.png")
})
}
shinyApp(ui = ui, server = server)