shiny app don't showing img when publishing

I made an application with shiny Moblie pkg and then run it to rsutdio it's ok and worked, but when publishing the app in the shinyapp.io its worked but don't show images and gif!!!
ui.R
server.R
www (folder for img)
-----gif (sub folder in www for gif)

Are you using relative or absolute file paths? are you using renderImage({})?

absolute file path and dont use renderimage({}).

So there is the answer. You should use a render function and a relative path starting from your www folder.

1 Like

in shiny moblie example don't using this methond for example you can run this code:
if(interactive()){
library(shiny)
library(shinyMobile)

shiny::shinyApp(
    ui = f7Page(
        title = "Cards",
        f7SingleLayout(
            navbar = f7Navbar(title = "f7Card"),
            f7Card(
                title = "Card header",
                img = "https://lorempixel.com/1000/600/nature/3/",
                "This is a simple card with plain text,
 but cards can also contain their own header,
 footer, list view, image, or any other element.",
                footer = tagList(
                    f7Button(color = "blue", label = "My button", src = "https://www.google.com"),
                    f7Badge("Badge", color = "green")
                )
            )
        )
    ),
    server = function(input, output) {}
)

}

I resolved it.
i use / in f7card(img = "/my_img.png") and changed to f7card(img = "my_img.png") and it ok and work.
tnx for all

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.