I want to display an image inside the dropdown select using Select2 library but the image is not appear. I have refer link below as reference also tried both code below but not solve.
The expectation as below:
Reference: Link 1
$('#preSvcSink').append($("<option selected style='background-image:url('img/icon/active.png');'></option>").attr("value", id).text(new_status));
$('#preSvcSink').append($("<option selected);'></option>").attr("value", id).text(new_status).html('<img src="img/icon/active.png">'));