Nomally "object-fit" property not supported by the "IE" browsers,
-o-object-fit: cover;
object-fit: cover;
Reference link: https://caniuse.com/#search=object-fit
Solution:
Please refer the following solution link: Object-fit: cover; alternative?
Note:
Use the image as a background.
Sample code from "snopes.com" :
Before :
<img class="bg-image lazy-resource" src="https://www.snopes.com/tachyon/2015/05/titanic-P.jpeg?resize=865,452" alt="Did a Black Woman Named Malinda Borden Perish Because Titanic’s Lifeboats Were ‘Whites Only?’" data-lazy-loaded="true" style="display: block;">
Solution :
Method 1:
Apply background image to a element from the image
tag.
<div class="set-bg-image">
<img class="bg-image lazy-resource" src="https://www.snopes.com/tachyon/2015/05/titanic-P.jpeg?resize=865,452" alt="Did a Black Woman Named Malinda Borden Perish Because Titanic’s Lifeboats Were ‘Whites Only?’">
</div>
<style type="text/css">
.bg-image {
visibility: hidden;
opacity: 0;
}
.set-bg-image {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.bg-image').each(function(){
var backgroundImageUrl = jQuery(this).attr("src");
jQuery(this).closest('.set-bg-image').css('background-image', 'url(' + backgroundImageUrl + ')');
});
});
</script>
Method 2:
You can assign the background image straightly to the 'set-bg-image' element while parsing.
Eg:
<div class="set-bg-image" style="background-image: url('https://www.snopes.com/tachyon/2015/05/titanic-P.jpeg')">
</div>
<style type="text/css">
.set-bg-image {
min-height: 150px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
</style>
Hope it will helpful.