How to embed an image to an email in a Workflow project email?
Environment
Workflow 8.x
Resolution
This is not as easy a question as it sounds. There is no single built-in component for adding image to HTML, especially encoding it. However, logic can be built to do exactly that.
Make sure you have the image as a byte array, FileDataType works and is a logical choice. 'Initialize Data' is a component that can be used to bring that in.
Use 'Encode to Base64' component to encode the image data - FileDataType.Contents is the byte array.
Put together HTML for the embedded image, 'Merge Text' is probably the best component for this: <IMG alt="My Image" src="data:image/jpeg;base64,[Encode to Base64 output variable]">
Resulting HTML that be fed into 'Send Email' component as the email body.
Note that whether and how embedded images work may vary based on mail servers and clients.