I have Node-red dashboard system under Ubuntu and it's used also to show reciept html template that goes to printer. Template have images and custom fonts in it but http response node don't show it. I've tried relative and absolute paths but it didn't work. Of course, user have permission to read data from directories. Please help me with this.
Let's say: I have html file on disk in some directory. /opt/recipe in this case.
Inside of /opt/recipe I have recipe.html and recipe.png files.
recipe.png is used inside of recipe.html.
Now, I've use nodes to show it on a page:
http in->file in->http response
OK, though somewhat odd location for Linux, you will need to make sure you have the permissions for the folder set correctly.
Now you've shared that info, your issue makes sense.
http-in/-out does not provide folder sharing. So you've only made available a single file by manually importing it and manually returning it.
Node-RED has several ways to make resource files available. For example, there is a property in settings.js that lets you define a specific folder (and its sub-folders) to serve up. See the comments in the settings file.
However, if you want to have a full web service, you would likely be better off using node-red-contrib-uibuilder. That provides a complete service including html, css, js and other file types. Assuming that you include the provided front-end library, you also get interactive communications between the web pages and Node-RED and you can use it to edit pages, serve up 3rd-party front-end libraries and much more.