function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RAMANJINEYULU GOGULARAMANJINEYULU GOGULA 

How do I insert an image from a Rich Text field in an html email template

I have rich text area field with an image but when I am trying to include the field using the merge field in the html email template ...image is not displaying in email.Any ways to display image from richtext area field.
NagendraNagendra (Salesforce Developers) 
HI Anjaneyulu,


Images in Rich Text Fields still require authentication to see them. However, unlike the recent thread regarding attached images, you might be able to work around this, though it's not button-click easy. But a Visualforce page with the rich text field on a public Site should make the image viewable. My only hesitation is whether or not the image URL would be the same in the VF page and the merged rich text field.

You might want to try using a VisualForce email template with the tag:
<apex:outputField value="{!objectname.RTFname__c}"/>
Note that the field, like all data in your email template, has to be accessible to the recipient. You might try using a public VF page (described in comments above), but another approach might be building logic into a custom component and style sheet to access an image from a static resource (which you can update with the Metadata API):  Hope this helps.

Please mark this as solved if the information helps.

Thanks,
Nagendra