Image Filter

Removes or replaces images that meet certain size criteria or originate from certain sources.

Image filtering is not only about removing annoying and bandwidth consuming banners. Invisible tracking images (also known as “web bugs”) are widely used by many commercial websites to keep track of the pages visited by the user. Those images (usually transparent 1x1 GIF images) can be easily intercepted. For example, something similar to

<img src="http://server-au.imrworldwide.com/cgi-bin/count?cid=au_newscorp_0" width=1 height=1>
(a typical “web bug”) will be converted to harmless
<img src="http://foxy/null.gif" width="1" height="1" border="0">

Parameters

src_include, src_exclude

src_include and src_exclude parameters define a set of image URLs to which filtering is applied. Unlike the standard include and exclude parameters that define addresses of the pages containing images, these parameters define addresses of images themselves (src attribute of the img HTML element).

Format:

scr_include = url_template
scr_exclude = url_template

Besides images, this filter also removes shockwave objects, iframe and script elements if their source URLs match the URLs specified by src_include and src_exclude parameters.

size_match

Defines size match mode. Possible values:

Format:

size_match = min
size_match = exact
size_match = any

The Image Filter will try all possible ways to determine image size when the size does matter:

size

Format:

size = width x height

Defines sizes of the images that must be deleted or replaces by the filter. There must be at least one size element defined if size_match is set to exact.

min_ratio

Defines minimum width to height ratio when size_match is set to min_size. Set to 0 if you want to use minimum size only.

Format:

min_ratio = number

min_size

Defines minimum image size when size_match is set to min_size. Set to 1x1 if you want to use minimum ratio only.

Format:

min_size = width x heigth

action

Tells the filter what to do with the images that match the criteria.

Format:

action = delete
action = replace:URL

delete - Remove images.
replace:URL - Replace images with the image defined by URL. URL can be either a path relative to httproot directory or an absolute URL.

keep_maps

If set to true, prevents maps from being deleted/replaced.

Format:

keep_maps = boolean

Note: some images are downloaded dynamically by scripts or are results of redirects. Such images cannot be easily removed by simply analyzing HTML code of the page that contains them. The browser still has to issue requests to fetch those images, so they can still be filtered out. But at this point it is unknown whether they are maps or not. To avoid damage such images might not be filtered when keep_maps is set to true.

keep_same_domain

If set to true, prevents images originating from the same domain as the page that contains them from being deleted/replaced. There are many websites where local images are benign; all the banners are coming from different domains (such as doubleclick.net).

Format:

keep_same_domain = boolean

See also Common Filter Parameters.

Example

type = Image Filter
name = Banners By Size
enabled = true
logging = true
time = 
user = 
include = *
size_match = exact
min_size = 1x1
min_ratio = 0.000000
keep_maps = false
keep_same_domain = true
size = 88x31
size = 89x26
size = 88x60
size = 120x60
size = 120x90
size = 120x240
size = 120x600
size = 125x125
size = 160x600
size = 180x150
size = 234x60
size = 468x60
size = 240x400
size = 250x250
size = 300x250
size = 336x280
size = 392x72
size = 400x40
size = 400x50
size = 720x300
size = 728x90
action = delete
src_include = *
src_exclude = canadiandriver.com
src_exclude = autos.yahoo.com
src_exclude = *futureshop.*
src_exclude = *bestbuy.*

type = Image Filter
name = Banners By Source (Generic Path Templates)
enabled = true
logging = true
time = 
user = 
include = *
exclude = *.google.*
size_match = any
min_size = 1x1
min_ratio = 0.000000
keep_maps = false
keep_same_domain = false
action = delete
src_include = *.ad.*
src_include = *.ads.*
src_include = *.adserver.*
src_include = *.adswap.*
src_include = *.hotlog.*
src_include = */*/ad
src_include = */*/adimage*
src_include = */*/adlog
src_include = */*/adredir*
src_include = */*/ads
src_include = */*/adserver
src_include = */*banner*
src_include = */ad
src_include = */ad.*
src_include = */adimage*
src_include = */adlog
src_include = */adredir*
src_include = */ads
src_include = */ads.*
src_include = */pagead
src_include = *advertising*
src_include = *banner*
src_include = *click*
src_include = *counter*
src_include = ad-*
src_include = ad.*
src_include = adbot.*
src_include = adbutler.*
src_include = adcenter.*
src_include = adcentral.*
src_include = adclick.*
src_include = adclient.*
src_include = adclix.*
src_include = adcontent.*
src_include = adcounter.*
src_include = adcreative.*
src_include = adcycle.*
src_include = adengine.*
src_include = adevents.*
src_include = adfarm.*
src_include = adflow.*
src_include = adfront.*
src_include = adhost.*
src_include = adimages.*
src_include = adimg.*
src_include = adlink.*
src_include = adlog.*
src_include = adlog.*
src_include = adman.*
src_include = admanager.*
src_include = admedia.*
src_include = admonitor.*
src_include = admotion.*
src_include = adnet.*
src_include = adnetwork.*
src_include = adpick.*
src_include = adpop.*
src_include = adproxy.*
src_include = adpulse.*
src_include = adpush.*
src_include = adrates.*
src_include = adredirect.*
src_include = adremote.*
src_include = adrunner.*
src_include = ads-*
src_include = ads.*
src_include = ads
src_include = adserv*
src_include = adsrv*
src_include = adstream.*
src_include = adstudio.*
src_include = adswap.*
src_include = adsweb.*
src_include = adtech.*
src_include = adtracking.*
src_include = adv-*
src_include = adv.*
src_include = advert*
src_include = affiliate.*
src_include = affiliates.*
src_include = affiliation.*
src_include = count.*
src_include = free-*
src_include = free.*
src_include = gpaper*
src_include = hit-*
src_include = hit.*
src_include = hitlist.*
src_include = imageads.*
src_include = link.*
src_include = links.*
src_include = linktracker.*
src_include = log-*
src_include = log.*
src_include = popup*
src_include = promo.*
src_include = pub.*
src_include = pubs.*
src_include = realmedia.*
src_include = redir.*
src_include = redirect.*
src_include = reklaam*
src_include = reklama*
src_include = stat.*
src_include = stats-*
src_include = stats.*
src_include = survey.*
src_include = sweepstakes.*
src_include = track-*
src_include = track.*
src_include = tracker.*
src_include = tracking.*
src_include = traffic*
src_include = partner*.*.*
src_include = redirect.*
src_exclude = *futureshop.*
src_exclude = *bestbuy.*
src_exclude = *canadiantire.*