1

I want to insert a contact image into a message template. This will be used to print PDF "info sheets" about contacts to include their photo.

Simply inserting the token {contact.image_URL} of course only displays the image URL in the PDF.

If I use something like <img src="{contact.image_URL}" width="100" height="100"> I get a missing image icon. I have tested with contacts that do have contact images.

How can I go about this?

3
  • What CMS are you using? If you’re on Drupal you can do this with Drupal Views and Views PDF; Commented Nov 12, 2019 at 22:01
  • I am on Drupal. Will I be able to do this in bulk? For example, I would select search results in CiviCRM and Print PDF in bulk. Commented Nov 12, 2019 at 23:31
  • You can use the html in the message. So <img src="{contact.image_URL}" /> Commented Nov 13, 2019 at 8:35

1 Answer 1

2

Also, depends on your setup, but if the message is going external, then the img src url would need to refer to an externally web hosted image file.

Apologies if I'm stating the obvious.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.