How to stop adblock plus blocking images in HTML page

…衆ロ難τιáo~ 提交于 2019-11-27 21:07:09
  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.

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!

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.

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!