How to show an image in a DataTables column?
How to show an image in a DataTables column?
![mnrafg](https://secure.gravatar.com/avatar/7349156bd3507a4b608d1d2533a5da98/?default=https%3A%2F%2Fvanillicon.com%2F7349156bd3507a4b608d1d2533a5da98_200.png&rating=g&size=120)
Just take a look at the following code:
columns: [
{ data: 'status'},
{
render: function(data, type, row, meta) {
return $('<img>').attr('src', row.image).get(0);
}
}
]
While I load my webpage with the upper code it show [object HTMLImageElement]
in that column.
This discussion has been closed.
Answers
Hi @mnrafg ,
This thread here should help, it's discussing the same issue.
If that doesn't help, please could you link to a running test case showing the issue. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin