Context directory in node-red

I would like to show a picture for node-red visualization that I like to store in permanent “/data/home/nodered/.node-red”-directory.
Any idea how to reference the picture link or what to configure in “settings-user.js” so that I can use locally stored pictures?

In the example below I used a picture from external webserver yet :wink:

1 Like

After some time I found a solution:

  • Adding following section in “/data/home/nodered/.node-red/settings-user.js”
module.exports = {
	 httpStatic: "/data/home/nodered/.node-red",
}

  • Restart nodered
  • create a subfolder like “/data/home/nodered/.node-red/Media” and store image in that folder
  • pay attention that folder has ownership nodered:nodered
  • Then you can reference source like
background-image: url(/Media/image.png);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.