Use standard HTML <img>
in ui_template (no need for additional nodes)
your function
that gets filename >> file in
node (return a buffer) >> ui_template
node with this in the ui_template : <img ng-src="{{msg.payload}}"/>
example...
[{"id":"68c3bd33.b27cb4","type":"inject","z":"a2a9b7f9.ae1948","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":600,"wires":[["835336f5.6ce7e8"]]},{"id":"95291454.e1da48","type":"ui_template","z":"a2a9b7f9.ae1948","group":"8e0dc95.8c8f838","name":"html image in ui_template","order":0,"width":"6","height":"6","format":"<img ng-src=\"{{msg.payload}}\"/>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":930,"y":600,"wires":[[]]},{"id":"b8f8e93.e40a518","type":"function","z":"a2a9b7f9.ae1948","name":"jpg encode buffer","func":"var getImageResult = msg.payload;\nvar b64encoded = getImageResult.toString('base64');\nmsg.payload = \"data:image/jpg;base64,\" + b64encoded;\nreturn msg;","outputs":1,"noerr":0,"x":680,"y":600,"wires":[["95291454.e1da48"]]},{"id":"835336f5.6ce7e8","type":"file in","z":"a2a9b7f9.ae1948","name":"","filename":"c:/temp/pic1.jpg","format":"","chunk":false,"sendError":false,"encoding":"none","x":460,"y":600,"wires":[["b8f8e93.e40a518"]]},{"id":"5dc9a83f.3b79a8","type":"file in","z":"a2a9b7f9.ae1948","name":"","filename":"c:/temp/pic2.jpg","format":"","chunk":false,"sendError":false,"encoding":"none","x":460,"y":660,"wires":[["b8f8e93.e40a518"]]},{"id":"96b5eeef.e647e","type":"inject","z":"a2a9b7f9.ae1948","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":660,"wires":[["5dc9a83f.3b79a8"]]},{"id":"8e0dc95.8c8f838","type":"ui_group","z":"","name":"Test1","tab":"fa8ca888.ede6d8","order":1,"disp":true,"width":"6","collapse":false},{"id":"fa8ca888.ede6d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1}]