Ok, I have a formula field that references a static resource image. This formula field displays correctly within the standard Salesforce UI but when I try and add the field to a custom visualforce field I cannot get it to display. I have tried every bit of syntax that I can find but I am not hitting on the correct one. Can anyone help?

Formula Field (Status_Icon__c):

Auto_Status__c = "Expired",
IMAGE("/resource/Expired","! Expired"),

Auto_Status__c = "Current",
IMAGE("/resource/Current","! Current"),


            <apex:column style="align:center;text-align:center;">
                <apex:facet name="header">Status</apex:facet>
                <apex:image url="{!Lic.Status_Icon__c}" height="50px"/><br />
                <apex:outputtext >{!Lic.Status_Icon__c}</apex:outputtext>

Sample from VF page:

enter image description here

1 Answer 1


You need to disable "escaping", a feature designed to prevent script injections. Since you control the formula, you can disable this automatic protection:

<apex:outputtext escape="false" value="{!Lic.Status_Icon__c}" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.