function loadImage(container, image_url) {
// alert(container + ' ' + image_url);
var img = new Image();
$(img).load(function () {
$(this).hide();
$(container).html(this);
$(this).queue(function () {
$('#loader').stop().fadeOut('fast');
$(this).dequeue();
});
$(this).fadeIn('fast');
}).error(function () {
alert('Error loading image');
}).attr('src', image_url); //---> .attr('src', "mywebsite.com"+image_url);
}
This is my own function to load image, the problem was in the last line where i add the attribute ‘src’ to my image. In my application i use relative url however “postname” permalinks change the base URL so i solved changhing to absolute url. Probably is not an elegant solution.