0
votes


Is there anyone encounter that when the website load it will automatically add width and height attribute and inline css to img tag that prevents image from loading.But other image from my website is loading. Im using bootstrap.

This is my original code

<div class="col-xs-10 div-property-information">
 <div class="row div-property-image is_advertisement">
  <img src="http://media.thehotelinventory.com.s3.amazonaws.com/static_ad/ad-image.png">
 </div><!--END OF div-property-image-->
 <hr class="row" />

</div>


This is the output

<div class="col-xs-10 div-property-information">
 <div class="row div-property-image is_advertisement">
  <img src="http://media.thehotelinventory.com.s3.amazonaws.com/static_ad/ad-image.png" width="0" height="0" style="display: none !important; visibility: hidden !important; opacity: 0 !important; background-position: 0px 0px;">
  </div><!--END OF div-property-image-->
  <hr class="row">

</div>

I tried to search on my javascript code and i found nothing that causing this attributes and inline css appear.

2
Here is my jsfiddle- link. @TroyThompson - Terinah14
I meant a link that replicates the problem you are having. - Troy Thompson

2 Answers

2
votes

I assume that you have some sort of ad blocker extension installed that sees the class is_advertisement and does everything possible to prevent that element from being shown. That's most likely why you don't see that image while others are visible.

0
votes

you can use css or js

css example

 .div-property-image is_advertisement img{
    display: none !important; 
    visibility: hidden !important; 
    opacity: 0  !important; 
    background-position: 0px 0px;
 }

js example

$(document).ready(function(){
  $(".div-property-image is_advertisement").find("img").css({"
           //you can control img inline style 
 "});
});