I'm trying to load an image with JQuery like so:
function loadImage( path ) {
var img = new Image();
$(img)
.error(function () {
alert('Error loading image');
})
.attr('src', path );
}
I'm wondering if I am able to change the Accept HTTP header before the image is loaded because the API for the images requires it.