How to: Images & Related Lists
This page will guide the user through how to pull images from Salesforce Object Records that are stored in the Files or Attachments related lists.
Images from Files Related List
<!--{{!
<lineitemsSOQL><class>table999</class>
<soql>select ContentDocument.latestpublishedversionid, ContentDocument.LatestPublishedVersion.pathonclient from contentdocumentlink where LinkedEntityId='{!ObjectID15}' AND (ContentDocument.LatestPublishedVersion.pathonclient LIKE'%.jpg%')
</soql>
<column prefix="<img src='/sfc/servlet.shepherd/version/download/" postfix="' width='150px' />">ContentDocument.latestpublishedversionid</column>
</lineitemsSOQL>
}}-->Insert the above code snippet directly into the Template Editor's Source.

Images from Attachments
In Salesforce Classic, Navigate to the Object Record, Select Attach File, upload the selected image. The following code block will now operate as expected.

Last updated
Was this helpful?

