I need to display an image attached to a custom object to all community portal visitors (logged in and not). I've managed to get the url, but it only works when I log in to SF first with my admin account. For community users the link doesn't work and only a 'broken image' icon is shown

  • 1
    So you are using /servlet/servlet.FileDownload?file={!attachment.id}, correct? Are you adjusting the domain to use the community domain and url rather than na10.salesforce.com (or what ever pod instance you are on). Commented Sep 18, 2014 at 8:50

1 Answer 1


Just use the URLFOR($Action.Attachment.Download, attachmentId) function and it will always return the correct URL.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .