Hi !
I am facing a problem, to add a background image to my plot. My app is serverless, and the image is provided by the user, through an input type=‘file’.
However, I cannot load the image neither using a relative path or absolute path. Here is the code :
const input_file = document.getElementById("img_file").files[0];
let update = {
images: [
{
source: `./img/${input_file.name}`,
xref: "paper",
yref: "paper",
sizing: "stretch",
x: 0,
y: 0,
sizex: 1,
sizey: 1,
opacity: 0.4,
xanchor: "left",
yanchor: "bottom"
}]
}
Plotly.relayout(GRAPHDIV, update);
Is there a solution for that ?
Regards,
Marion