Is there any way to use an image from the file cab...
# advancedpdf
j
Is there any way to use an image from the file cabinet in an Advanced PDF/HTML template if it is not marked "available without login"? I.e. I do not want any old internet user to potentially have access to that image, but I do want it to be able to print on the relevant templates that users can access.
w
If you find out how, I'd like to know. I don't think it is possible.
j
@wes_w I'm still a noob at this pdf/html stuff, but this SA article seems to indicate that you can at least restrict it just to your company. But when I do that, it doesn't work, just gives the default logo/error logo, so 🤷‍♂️
h
I think NS uses Big Faceless Organization (BFO) engine to generate the PDFs so all files and images should be available with login in order to be included
e
You can try embedding the base64 representation of that image on the PDF and reference it in the img src tag instead of the image file link.
r
You can re-upload them in another folder. This will change their media item id. Old users can't access it if they don't have the url.
j
@Eric B Brilliant! Base64 worked like a charm.
👍 1
@wes_w embedding the base64 representation worked well for me as Eric suggested. Just do:
Copy code
<img src="data:image/png;base64, yourbase64imagestring"/>
with "yourbase64imagestring" being the part you should replace with your base64 encoding.
w
Wow. Didn't know you could do that.
j
Me neither. I mean I guess I had seen it a long time ago, but this is my first time doing HTML in like 10+ years.
👍 1