Block all images with some exceptions

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Oxwivi
Posts: 3
Joined: Tue Dec 18, 2012 8:00 pm

Block all images with some exceptions

Post by Oxwivi »

Uh, so, there's two questions involved in reaching the result mentioned above:
  • How do I make ABP block all elements classified as images? If possible I'd like to make it so that ABP blocks everything Fx recognizes as images instead of compiling a string of image extensions to be blocked.
  • How do I whitelist for only specific rules? In this case, I would like whitelist certain websites only from the image blocking rule I am trying to create. Ads will still be blocked in accordance with the subscribed lists.
Any and all help will be extremely appreciated.
User avatar
Crits
Posts: 394
Joined: Mon Jan 16, 2012 11:54 am
Location: France
Contact:

Re: Block all images with some exceptions

Post by Crits »

Hi,

Here are the filters to block all images (the |http:// and |https:// are needed to avoid the filters being too slow):

Code: Select all

|http://*$image
|https://*$image
After having added these filters, whitelisting the images on one website will be a bit more difficult and case-specific.
For most cases, @@||example.com^$image will be able to whitelist the images on example.com, but if you add only this filter:

- The images not from example.com but which are displayed on example.com will still be blocked
- If they are some ad images from example.com, displayed on example.com, then won't be blocked.

The best thing to do to whitelist images on case-by-case basis is to:
1. Open the List of Blockable Items (Ctrl+Maj+F on Firefox)
2. Check what were the images blocked (the URLs should be in red)
3. Double-click on the URL of the blocked images, and then create specific whitelist with Adblock Plus
Author of Liste FR, an ad-blocking subscription for French websites
Oxwivi
Posts: 3
Joined: Tue Dec 18, 2012 8:00 pm

Re: Block all images with some exceptions

Post by Oxwivi »

Crits wrote:(the |http:// and |https:// are needed to avoid the filters being too slow)
You mean replacing the protocol with a wildcard will make it slow?
Crits wrote:- The images not from example.com but which are displayed on example.com will still be blocked
- If they are some ad images from example.com, displayed on example.com, then won't be blocked.

The best thing to do to whitelist images on case-by-case basis is to:
1. Open the List of Blockable Items (Ctrl+Maj+F on Firefox)
2. Check what were the images blocked (the URLs should be in red)
3. Double-click on the URL of the blocked images, and then create specific whitelist with Adblock Plus
Will not work for me. Images on regular pages are rather static and only for graphics, and as such does not hold an interest for me. For those that does, i.e. found on the websites I am trying to whitelist and exempt from the image blockade, are variables. You can use comics for example. If I want to read a comic, obviously each new chapters will be different images.
Oxwivi
Posts: 3
Joined: Tue Dec 18, 2012 8:00 pm

Re: Block all images with some exceptions

Post by Oxwivi »

Folks, never mind.

I was already aware of, and unchecked, the Load images automatically option under the Content tab in Preferences/Options (depending on your OS). What I did not notice was the Exceptions... button corresponding to it on the far-right.

There was no need to use an addon for this at all.

Thanks for all the help and sorry if it all went to wasted.
User avatar
Crits
Posts: 394
Joined: Mon Jan 16, 2012 11:54 am
Location: France
Contact:

Re: Block all images with some exceptions

Post by Crits »

Oxwivi wrote:You mean replacing the protocol with a wildcard will make it slow?
Yes, a bit slower: it's due to the way ABP match resource URL and filters. By adding the protocol in the filter, ABP will be able to extract a keyword from those filters ("http" or "https"), which will fasten the matching algorithm a bit.
Oxwivi wrote:Will not work for me. Images on regular pages are rather static and only for graphics, and as such does not hold an interest for me. For those that does, i.e. found on the websites I am trying to whitelist and exempt from the image blockade, are variables. You can use comics for example. If I want to read a comic, obviously each new chapters will be different images.
If you want to with ABP still, and not Firefox, you can do it on a case-by-case basis. For example, for this manga site, all the manga images are in this foler: http://img.mangastream.com/m/ , thus this filter:

Code: Select all

@@||img.mangastream.com/m/
Author of Liste FR, an ad-blocking subscription for French websites
Post Reply