How to load an asset from not app.py

– app.py
– Components
-----myfirstcomponent.py
-----mysecondcomponent.py

If the line below exists in one of the following files in the Components dir.

html.Img(src=app.get_asset_url('my_pic.svg))

I would get the Nameerror as name ‘app’ is not defined. How do I solve loading assets.

Hi @shubhamsharan

Try using dash.get_asset_url()