UI template image via msg.payload

this works fine as long as the filename is fix.
But how to display a picture from the given directory on filename in msg.payload?