+ Start a Discussion
Dharmendra Kumar 60Dharmendra Kumar 60 

Unable to display image in lightning datatable row

Controller code:
component.set('v.columns', [ { label: 'formulafield', fieldName: 'formulafield__c', type: 'text', initialWidth: 350, editable: false, sortable :true }, ]);

Formula field :
IMAGE('/sfc/servlet.shepherd/version/download/'+Campaign_Image_Content_Version_ID__c, 'Preview of Marketing Campaign',200 ,-50)

out put in the lightning component:
<img src="/sfc/servlet.shepherd/version/download/" alt="Preview of Marketing Campaign" style="height:200px; width:-50px;" border="0"/>

The above code is displaying the URL in the lightning dataTable instead of the actual image. Image is choosen according to different criteria in the formula field. I need to show the actual image instead of the URL. Please help .

Currently it is not supported.
Vote for this idea - https://success.salesforce.com/ideaView?id=0873A000000lKqxQAE
Magulan Duraipandian
Dharmendra Kumar 60Dharmendra Kumar 60
Hi Magulan,

What is the workaround for this ?
I am trying to build something like this, where 'View' will show all campaign member and 'Add' will take to create new campaign member .
Need to include campaign image graphcs in the row. What is the other approach for this . Please help.
User-added image
Bryan KongBryan Kong

I am facing the same issue. Did anyone find a workaround for this?