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
Gunwinder Singh 4Gunwinder Singh 4 

Visualforce email template image not displaying

Wonderful People,

I am new to Visualforce, i would need some direction as to how to create a dynamic email template. We provide support for more than 70 clients and for which we have created custom branded templates (HTML) and therefore need to use equallent workflows and have recently maxed out on 300 active workflows in our Org.

Therefore i want to create a custom dynamic visualforce template that could dynamically fetch the logo. For this i have:

1. Created a Rich Text feild and have added the logo of the institution.
2. Added the following string which gets me a broken image link instead of the image / logo.
<apex:image url="{URLFOR(!relatedTo.AccountLogo__c)}" /> 

Please suggest as what is it i am doing wrong, and if there is any better way to create a dynamic email template.

Thanks in advance,
 
Gunwinder Singh 4Gunwinder Singh 4
User-added image
ajay rawat 14ajay rawat 14
Hi Gunwinder Singh
                    <apex:image> is expecting url but richtext box contain image try using <apex:outputField> in email tempale.But its better to use static resource for image because your rich text may not be avairable for public user.

https://help.salesforce.com/apex/HTViewSolution?id=000005925&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000005925&language=en_US)

Hope it will help you.
Regards
Ajay Rawat