0

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?

  • What CMS are you using? If you’re on Drupal you can do this with Drupal Views and Views PDF; – KarinG - Semper IT Nov 12 '19 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. – Justin Moore Nov 12 '19 at 23:31
  • You can use the html in the message. So <img src="{contact.image_URL}" /> – Jaap Jansma - CiviCooP Nov 13 '19 at 8:35
0

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, privacy policy and cookie policy

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