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

How to show a formula field(have Image) of an object in lightning component.

I want to show formula field that is in Lead Object,And this formula field contains Image. when i call this field in component in OutputText it show url of Image. please help me. I don't know how to use OUTPUTRICHTEXT

<aura:component controller="LeadLightningContoller">
	 <ltng:require styles="/resource/SLDS103/assets/styles/salesforce-lightning-design-system.min.css"/>
    <aura:attribute name="Leads" type="Lead[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

 <aura:iteration items="{!v.Leads}" var="lead">

 <ui:outputText value="{!lead.Rating_Image__c}"/>

helper Class

	getLeadList : function(component) {
        var action=component.get("c.ShowLead");
            var status=res.getState();

public class LeadLightningContoller {
    public static List<Lead> ShowLead(){
        List<Lead> leadList=new List<Lead>();
        leadList=[select Name,Email,Status,Phone,No_of_days_Open__c,Rating,Fax,Rating_Image__c from Lead limit 10];
        return leadList;


<aura:application >
  <c:LeadData />

Sorry. Here is Component Controller
   doInit: function(component, event, helper) {      

Ricardo Coutinho 7Ricardo Coutinho 7
Same here...
Ricardo Coutinho 7Ricardo Coutinho 7
Hi Kumar,

I already know how it is.
Use the outputRichText tag, like this:

<ui:outputRichText value="{!contact.Image__c}"/>
ashu 6112ashu 6112
I am using ui:outputRichText to display image and its working fine as expected, but i have to do something on selection of that record. How to acheive this. I am using click, dlbclick events but its not working. Anyone help please