To retrieve the ContentVersion ID associated with a Contact's profile picture, you need to create a Multi-Step Report (MSR), as the ContentVersion record is not directly related to the Contact object.
The report should follow the relationship:
Contact → ContentDocumentLink → ContentVersion
Start with the Contact object as the top-level step. Add a second step using ContentDocumentLink to retrieve the files associated with the Contact. Then add a third step using ContentVersion to retrieve the corresponding ContentVersion record and include the ContentVersion ID in the report.
Once the ContentVersion ID is available in the report, it can be mapped directly to an image merge field in the document template using the @IMAGE merge syntax. During the merge, Apsona automatically uses the ContentVersion ID to locate the associated image file and render it in the generated document.
When working with images stored in Salesforce Files, always retrieve the ContentVersion ID through a Multi-Step Report rather than using a file URL. Apsona's merge engine uses the ContentVersion ID to locate and embed the image when it encounters the @IMAGE merge field.