Display pictures on html Buttons while pushing a dash app to heroku

Hello community!

First of all, I would like to thank you for all the posts here, it helped me a lot in building my first dash app from scratch (more than stackoverflow, could you imagine? :stuck_out_tongue: )

Today, I decided to finally push the whole thing to heroku, using the magical guide (<3). After a few problems fighting with packages versions, buildpacks and so on, it is alive ! Except for the small icons on my html buttons. They are stored in an “assets” folder, and called in the app through the following line :

html.Button(children=[html.Img(src=app.get_asset_url('Seldes_fit.svg'),style={'width':'100%'})]

But they don’t load, when I try to copy image adress and run it in an other tab I get the 404 error. I tried many stuff, I use whitenoise with the line :

server.wsgi_app = WhiteNoise(server.wsgi_app, root='assets/')

I don’t really understand what I’m doing wrong. Is anyone encountering the same issue?

Many thanks for your help :).

And as a wise man said, sometimes you find the answer as asking others. I fixed it by adding “name” in the “dash.Dash” command. Worked like a charm. Hope this will help.