webapi.safeAjax({
type: "GET",
url: "/_api/msevtmgt_events?$select=px3_heroimage&$filter=px3_heroimage_url ne null&$orderby=px3_heroimage_timestamp desc",
contentType:"application/json",
success: function(res) {
$( res.value ).each(function( index ) {
$('#main').append('<img class="img-responsive" src="data:image/png;base64,' + res.value[index].px3_heroimage + '">');
});
},
error: function(xhr, status, error){
$('body').append('<img class="img-responsive" src="/artwork-not-found.svg">');
var errorMessage = xhr.status + ': ' + xhr.statusText;
console.log(errorMessage);
}
});