Figure source define different Path and URL

Hello,

I am a Bio-medecine PhD student and I am trying to use Dash and Flask to create a plateforme for health data annotation.
I am trying to recreate the image segmentation app tutorial (Interactive image segmentation based on machine learning) in my Flask App and I have managed to make it run except for a small part of it.

I want to show my image in my figure but I wanted to know if it is possible to set different Path and URL for a figure ?
Here is (part) the figure object that I’m trying to plot:

    'images': [{'layer': 'below',
                'sizex': 1280,
                'sizey': 960,
                'sizing': 'contain',
                'source': '/home/corentin/myoxia/app/dashapp/static/segmentation_img.jpg',
 

Here is the error I get into my browser:

http://127.0.0.1:5000/home/corentin/myoxia/app/dashapp/static/segmentation_img.jpg 404

Well, it is using the absolute path to the image to try to get it, but the flask server is not serving it.
My assets are served on:

http://127.0.0.1:5000/static/dashapp/*

My assets are located in:

/home/corentin/myoxia/app/dashapp/static/*

One workaround would be to make the Flask server serve the image on the absolute URL (ugly).
Another would be to be able to give separate URL and PATH to the figure image. Is this possible ?

Last wourkaround that I can think of is that it looks like dash like to use relative path. So I would need to switch to relative path and serve my assets on the same folder as code (so the URL and relative path are the same)

Thanks, have a nice day !

One workaround would be to make the Flask server serve the image on the absolute URL (ugly).

This worked, but it expose my folder organisation, and so it is pretty bad.