I have with scaling images on my site, everything working properly, but on IE8 (on older and newer version this working properly) images not scaling as they have too - I got only upper left corner of the image.
There is how image shows on firefox, chrome, ie6,ie7,ie9 etc.: https://i.stack.imgur.com/DShKc.jpg
and there how it shows on ie8: https://i.stack.imgur.com/aXSrB.jpg
Part of code of my image script:
$('.artykul-tresc p img').each(function() {
var img = this;
var src = $(img).attr('src');
var width = $(img).width() + 'px';
var height = $(img).height() + 'px';
var wm_top = $(img).height() - 38 + 'px';
var alt = $(img).attr('alt');
var replacement = sprintf("<a href=\"%s\" class=\"fancybox\" rel=\"images\"><div style=\"background-image: url('%s'); background-size: cover; width: %s; height: %s; display: inline-block;\"><img src=\"/static/watermark-photo.png\" style=\"position: relative; top: %s; float: right;\" /></div></a>", src, src, width, height, wm_top);
$(img).replaceWith(replacement);
});
and there is code from the site:
<a href="/userfiles/image/sufit-podwieszany-armstrong-2.jpg" class="fancybox" rel="images"><div style="background-image: url('/userfiles/image/sufit-podwieszany-armstrong-2.jpg'); background-size: cover; width: 185px; height: 274px; display: inline-block;"><img src="/static/watermark-photo.png" style="position: relative; top: 236px; float: right;"></div></a>
image width and height isn't static, so how I can fix this for IE8?