How to stop adblock plus blocking images in HTML page

前端 未结 4 1236
一整个雨季
一整个雨季 2020-12-05 09:50

I am building a simple HTML page with some images, my FireFox has Adblock Plus—recently installed— and it blocks these images. I look at other similar pages on the net and t

相关标签:
4条回答
  • 2020-12-05 10:18

    I had a very similar issue, I had some banners to display on an eCommerce site, put them im a folder called banners/size. After the page rendered, the banners would disappear in Chrome. I thought something was going crazy in JavaScript somewhere, I tried in Firefox and everything worked. Only difference, no AdBlock enabled in Firefox!

    Inspecting the image statements, it had appended this to every image in the banners folder:

    style="display: none !important; visibility: hidden !important; opacity: 0 !important; background-position: 1px 1px; width="0" height="0"
    

    I renamed the banners folder to img_bnr, sorted!

    0 讨论(0)
  • 2020-12-05 10:27

    I had similar issue with filename like this:

    adv_s_imagesName.png <-- Blocked by adblock because of "adv" in filename

    for me "adv" mean "advanced" but for adblock it's "advertising"!

    File renamed, no more block.

    0 讨论(0)
  • 2020-12-05 10:28

    Same here - had an image with 'adtech' in the name (abbreviation for advertising technology). Took me ages to figure out that adblocker was blocking because of the filename. Adtech being AOL's ad-serving platform. Understandable keyword to look out for, frustrating chasing you tail for ages trying to figure out why your content image is being blocked.

    0 讨论(0)
  • 2020-12-05 10:30
    1. I'm assuming that you're not talking about Adsense here but images hosted on your server and hard coded into your page.

    2. If so they're probably being blocked because of the file name and/or path.

    Adblock will block images

    • with common ad dimensions in the file name, e.g. 'myimage_720_90.png' or 'myimage_300x250.jpg'.
    • with common ad keywords in their path (and file name), e.g. banners, adv, ad.
    • maybe other filters that analyse CSS or HTML

    Check your image file names and rename some to see how it goes, try something generic like 'topwide.png or similar to avoid the filters.

    0 讨论(0)
提交回复
热议问题