Please show us a simple example of the code you used to produce your output
There is no need to use actual data: use some random strings and numbers.
Also show us the template (that is an image as I understand) and tell us what format is has:
a jpeg- or a pdf-file ?
EDIT: is this related to an earlier question :
https://forum.posit.co/t/showing-images-in-using-ifelse-condition-in-r-markdown/141648
?