Hello.
I'm trying to show my image logo on the dashboard.
It works on my local network, but not online.
I'm using node-red-contrib-ui-media do display the image and i'm using ngrok to access my dashboard online.
When accessing online through my custom ngrok subdomain it doesnt work
hi @Steve-Mcl
as i said it works just fine when accessing my dashboard from my local network, using the ip address of my raspberry pi (where nodered is installed)
but when trying to access the dashboard from the internet using the subdomain from ngrok (https://mysubdomain.ngrok.io) everything works, but not the image it does not get loaded, as i show in the image
the image url just show the local folder of the images
So do you have an endpoint in your node-red set to /admin/uimedia/dashboardMedia/ to serve that file OR is /admin/uimedia/dashboardMedia/ an actual file path with LogoNSH.png file inside?
Or have you setup a public folder via settings.jshttpStatic setting?
Lastly, what error do you see in your browsers dev tools (f12) console. 401? 404? Other?
e.g..
ok, with the img src set to ../LogoNSH.png can you once more inspect the URL - more specifically, what the browser thinks the URL is by hovering on the img element SRC value...
Are you 100% certain you have edited and deployed the change? As you have /ui/ in the URL - suggesting you either didnt deploy or you are looking at a cached page
Double check the img SRC is set to ../LogoNSH.png, double check it is deployed, hard refresh dashboard browser (CTRL+F5)
If it is still not working, please do what I asked in previous response by hovering your mouse over the URL like in the picture...
I suspect your ngrok is limiting access to the upper level ../.
I can offer you an alternative solution where you serve the file(s) via an endpoint made out of http-in and http-response nodes in your flow if you want to try it?
OH - also, as an alternative, you could use a base64 text version of your image & serve that.
(or read the file in using file node and convert to base64 using the base64 node or a function node - then send it through a template node to construct a base64 URL img tag)