You are here:
Retrieve Images During Server-Side Omnistudio Document Generation With Sample Custom Class
To retrieve images during server-side document generation, create an Apex class in your org that exposes the getImageContentBlob() method. During Server Side document generation, Salesforce calls this method to retrieve Base64-encoded image data. In your document generation request, pass image token data for each image token. Set the IMG_ token’s src value to a lookup key that matches a key in the imageContentMap returned by getImageContentBlob(). Salesforce uses this mapping to resolve and insert the image during document generation.

