# NOT RUN {
# The URL below has been chunked to comply with CRAN
# requirements; the use of file.path is optional and not required
# for this component.
if (interactive()) {
library(dash)
app <- Dash$new()
app$layout(
htmlDiv(list(
htmlPicture(list(
htmlSource(srcSet = file.path("https://upload.wikimedia.org",
"wikipedia/commons/a/a7",
"Winter_and_the_City.jpg",
fsep = "/"),
media = "(min-width: 800px)"),
htmlImg(src = file.path("https://upload.wikimedia.org",
"wikipedia/commons/5/56",
"Summer_and_the_City.jpg",
fsep = "/")),
htmlP("Resize screen to see image changing...")
))
))
)
app$run_server()
}
# }
Run the code above in your browser using DataLab