I have currently created a custom field in CiviEvents to upload an image for my event. When viewing the eventinfo page I can see the image in a collapsible field which shows the thumbnail of the image and when I click on the image it enlarges in a popup box.

All I need is the actual custom field url that point to the image so I can theme it correctly on my template.

I've dug deep into the CustomDataView.tpl and come across {$element.field_value} but again this loads the custom field in the collapsible pane.

Any suggestions?

Thanks in advance

1 Answer 1


For security reasons, CiviCRM does not expose uploaded files directly, but routes them through a php script which checks permissions before fetching the image. If you know the file id and the event id, then you can construct the url yourself:


  • Is there a way to input the FILE_ID and EVENT_ID programically as for each event the uploaded picture would be different? Thanks in advance
    – pacusi
    May 28, 2016 at 12:18
  • Of course you would need to use variables.
    – Coleman
    May 28, 2016 at 13:15
  • 1
    This is not right anymore, since a file hash is mandatory. See civicrm.stackexchange.com/questions/28754/… Jul 18, 2019 at 10:47

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.