Displaying an image in datatables from a Sharepoint list
Displaying an image in datatables from a Sharepoint list
Hi
I am trying to display an image from a SharePoint list in a datatable. The image is being stored in sharepoint using a SharePoint picture column, which basically accepts a URL to where the image is located.
I have seen from other people they are using the below to display an image stored in DB (SharePoint list is my DB in effect):
{ "mData": "Image", "render": function (data) {return '<img src="' +data+ '" />';}},
However just displays the broken image symbol.
If I just display as normal: { "mData": "Image" },
I get:
[object Object]
Any ideas how I can get this working ?
Any help appreciated
Answers
"{ "mData": "Image", "render": function (data) {return '<img src="' +data+ '" />';}},
However just displays the broken image symbol."
FYI: The broken image symbol source URL is
<SharePoint site URL>/pages/[object%20Object]