Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Image works fine locally but not on Heroku

$
0
0

@martijn wrote:

Hey Guys,

Images aren’t working in my app when deployed to Heroku while everything works fine locally. As an example I made a simple app to display an image:

app = dash.Dash()
server = app.server

app.layout = html.Div(
    dbc.Card([
        html.P("test"),
        dbc.CardImg(src=app.get_asset_url('placeholder.jpg'))
    ])
)

Locally it works as intended:


But on Heroku it does not:

I’ve put the assets folder and its contents in GIT so that can’t be the reason the Assets folder is not being found by Heroku. Also note that there are 8 images in my Assets folder even though one only is shown under Resources. (smart loading?)

Anyone has an idea what I could be doing wrong?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles