Loading images in Markdown node

Hello everyone!

I was trying to visualize an image with markdown, but I am unable to create a link to the image. Using the absolute path to the image did not work.

Node content:

Result:
image

File Path:
image

Have you tried double back slashes \\, as \ has special meaning in node-red escape following char
Or use forward slashes as they are allowed in windows.

Both suggestions did not work.

Show us what you typed.
Can you access the image direct in browser using ip:1880/file/path/name.png?
Have set up a httpStatic folder to serve files from, this may be easier to serve using /path_from_static/name.png
https://nodered.org/docs/user-guide/runtime/configuration#runtime-configuration

image

image

I'll try the with the httpStatic config and let you know

Setup the file path and still didn't work. I also tried with double backslashes

I am not a windows user.

My httpStatic is in my .node-red folder in a folder called static. I then put all files i wish to server in there.
example in static there is a files folder, in that folder is test.png.
The markdown is
![image](/files/test.png)

You may have a permissions/firewall issue, hopefully a windows user may know more.

p.s. Please paste text in forum, images of text are hard to copy.

In windows we need to use double slash...

httpStatic: 'C:\\Users\\user\\.node-red\\public'

In the markdown node use:

![Image Text](/test.png)

or

<img src="/test.png" alt="Test">

In this case, the real path (on disk) for image is C:\Users\\user\.node-red\public\test.png.

This works when accessing the dashboard locally (127.0.0.1)

Thank you both. This configuration worked for me!

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