Just a note about using a relative URL from the Dashboard ui:
When viewing the dashboard, your browser considers that you are in the 'ui' directory.
For example:
http://192.168.43.106:1880/ui/
If your settings.js file is set to serve static files in /home/pi/.node-red/static/,
your browser will consider this static directory as root.
You need a ../ to move up one directory from 'ui' to root.
A relative URL from the 'ui' directory would look like this (assuming msg.payload has the image name):
<img src="../{{ msg.payload }}">