Since you already have access to the image on base64 format form the step above, to prevent the image of the signature from being public, we could just reference the output of the JS query, and create the image from it on the PDF using Markdown:
![signature_image](data:image/png;base64,{{JSqueryThatProvidesBase64.data}})