Answers.Body: <p>I was able to add a custom field to contacts and upload a signature file to relevant users and then use that generated url. This work around isn't ideal as it means tying the image to a custom field that may not be relevant and a relative location hex link that looks roughly like this:</p>
  <p>mysite.civicrm.org/civicrm/file?reset=1&amp;id=2&amp;eid=28&amp;fcs=54ef7e8c1d8fc5b70133338bb1872353e</p>
  <p>but we do what works. I would appreciate a better solution if anyone has one.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T01:31:59.107Z
Answers.LastActivityDate: 2021-02-03T04:41:15.883Z
Answers.LastEditDate: 2021-02-03T04:41:15.883Z
Answers.UserDisplayName: user8823
Body: <p>I am on civicrm spark running 5.32.beta1 and I cannot get images to work on templates with PDF document merge.</p>
  <p>Since it's spark I have little control over the backend installation. As far as I can tell I can't use local image hosting located at &quot;https://mysite.civicrm.org/sites/mysite.civicrm.org/files/civicrm/persist/contribute&quot;  so I have tried hosting the images on our main organization webhost and using the url in an image tag. This appears to work fine for emails but will not generate in the pdf output.</p>
  <p>I found this help relevant:
  <a href="https://forum.civicrm.org/index.php%3Ftopic=22663.0.html" rel="nofollow noreferrer">https://forum.civicrm.org/index.php%3Ftopic=22663.0.html</a>
  but since I'm on spark I don't believe I have any control over the civicrm version or the &quot;allow_url_fopen&quot; field. Can I only use any images already hosted on civicrm.org then? Is there something I'm missing?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-04T13:20:01.520Z
Comments.Text: I recommend posting a link to this question in the Spark channel at chat.civicrm.org!
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <pdf><civicrm-spark>
Title: Images in templates on civicrm spark
ThreadText: # Images in templates on civicrm spark
  
  (Asked by: username_0 on 2021-02-03)
  
  I am on civicrm spark running 5.32.beta1 and I cannot get images to work on templates with PDF document merge.
  
  Since it's spark I have little control over the backend installation. As far as I can tell I can't use local image hosting located at "https://mysite.civicrm.org/sites/mysite.civicrm.org/files/civicrm/persist/contribute" so I have tried hosting the images on our main organization webhost and using the url in an image tag. This appears to work fine for emails but will not generate in the pdf output.
  
  I found this help relevant:
  <https://forum.civicrm.org/index.php%3Ftopic=22663.0.html>
  but since I'm on spark I don't believe I have any control over the civicrm version or the "allow\_url\_fopen" field. Can I only use any images already hosted on civicrm.org then? Is there something I'm missing?
  
  **Tags:** pdf, civicrm-spark
  
  > **Comments:**
  > **username_1**: I recommend posting a link to this question in the Spark channel at chat.civicrm.org!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-02-03. Score: 1
  
  I was able to add a custom field to contacts and upload a signature file to relevant users and then use that generated url. This work around isn't ideal as it means tying the image to a custom field that may not be relevant and a relative location hex link that looks roughly like this:
  
  mysite.civicrm.org/civicrm/file?reset=1&id=2&eid=28&fcs=54ef7e8c1d8fc5b70133338bb1872353e
  
  but we do what works. I would appreciate a better solution if anyone has one.
  
  
  ---
  
  