Adblock Plus and (a little) more

How to get rid of the new photo preview feature on Twitter · 2013-11-06 18:26 by MonztA

As usual, it seems, it is the user who must adapt to changes and new rules. This time it’s Twitter changing the layout of its timeline, both in its web client and mobile version. The most notable change is that users are being served a pre-displayed image that expands when they click on it. On the Twitter mobile client, you can disable this feature by unchecking the “photo preview” box; but there is no way to opt out on its web client unless you use the filter we specifically created for it.

Follow these steps and you will easily get rid of Twitter’s photo preview feature:

  1. Install Adblock Plus, go to www.adblockplus.org
  2. Once installed and depending on which browser you use:

a) On Firefox: right-click the “ABP” logo (most likely in the left corner on the bottom), then “Filter preferences…”, then “Custom filters” on the top, “Add a filter group”, give it a name, for example “twitter filters” right-click it and choose “Show/hide filters”, go to “Add filter” on the right and paste these filters:

Update: Looks like these filters no longer work. Use this one instead: ||pbs.twimg.com/media/*:large$image,domain=twitter.com (Thanks Patrick Smith!)

Update 2 (17.12.2013): New filter: twitter.com##.stream-item:not(.open) .tweet .media (Thanks again Patrick Smith!)

Update 3 (20.10.2014): twitter.com##.stream-item:not(.open) .tweet .js-media-container (Thanks to Hillmy!)

Update 4 (10.04.2015): twitter.com##.stream-item:not(.open) .tweet .js-adaptive-media-container

Update 5 (09.12.2015): twitter.com##.js-stream-tweet:not(.opened-tweet) .js-adaptive-media-container img

For pictures: twitter.com ##.tweet .media > .media-thumbnail.is-preview > img

For videos: twitter.com##.js-stream-tweet > .content > .expanded-content > .tweet-details-fixer > .js-media-container[data-card2-name="player"]

Add the filters and you are done!

b) On Chrome and Opera 12.x: right-click the “ABP” logo in the address bar (in Opera it is on the right at the search bar) on the right and choose “Options”, click “Add your own filters”, paste these filters:

For pictures: twitter.com ##.tweet .media > .media-thumbnail.is-preview > img

For videos: twitter.com##.js-stream-tweet > .content > .expanded-content > .tweet-details-fixer > .js-media-container[data-card2-name="player"]

in the text field and click on “Add filter”.

c) On Opera 15 and above, go to the “extensions” option in the menu, select “Adblock Plus options”, then “add your own filters”, paste this filters:

For pictures: twitter.com ##.tweet .media > .media-thumbnail.is-preview > img

For videos: twitter.com##.js-stream-tweet > .content > .expanded-content > .tweet-details-fixer > .js-media-container[data-card2-name="player"]

in the text field and click on “Add filter”.

Tags:

Comment [15]

  1. Gia · 2013-11-07 03:59 · #

    Just want to let you know, this is a great app, it works 100% and it allows people to browse websites without being ‘attacked’ by pop-ups.

    keep up the wonderful work!

  2. Chris · 2013-11-11 02:51 · #

    Thank you so much for this fix, works perfectly.

  3. Marguerite O'Connell · 2013-11-11 04:13 · #

    This fix worked perfectly at first. Now though, can’t open pic.twitter links in the timeline at all. Have to click the link and open picture outside of timeline. Kind of a hassle. Would be great if could disable the automatic previews in timeline but could still see those pics you choose to look at by clicking on the tweet. Any hope?

    Reply from MonztA:

    That’s not possible unfortunately.

  4. Larain · 2013-11-20 17:43 · #

    Not working on mine. :(

  5. Geoff · 2013-11-21 12:48 · #

    The damned things seem to be back today (21st November) in Chromium Version 31.0.1650.57 (235101) – linux. Can an alternative filter be devised please?

    Reply from MonztA:

    The filters still work for me. Did you check if you still have the custom filter in Adblock Plus?

  6. Patrick Smith · 2013-11-25 17:19 · #

    If you add this custom filter

    “https://pbs.twimg.com/media/*:large” instead,

    it will disable viewing preview, but retain viewing the image when tweet is clicked.

    Posted this on Halloween in my blog

    http://patrixmyth.com/2013/10/30/block-twitter-timeline-photos/
    and it’s been working for myself and others ever since.

    Hope that helps someone else.

  7. Dove · 2013-11-26 07:19 · #

    It’s not working for me too. I checked and both the custom photo and video filters are there. But I’m still seeing the photo and video previews (I use Firefox).

    Reply from MonztA:

    This one should work: ||pbs.twimg.com/media/*:large$image,domain=twitter.com

  8. kelly · 2013-12-14 03:57 · #

    I tried the new filter but it doesn’t work (Firefox 26.0 on iMac, IOS 10.6.8). Help?

    Reply from MonztA:

    Have you tried adding the new filter? ||pbs.twimg.com/media/*:large$image,domain=twitter.com

  9. gotit · 2013-12-14 19:09 · #

    Ok, here is a filter that blocks the timeline image preview but does not block the image when the tweet is expanded:

    twitter.com##LI .is-preview > IMG

    No more horrors on my timeline.

  10. gotit · 2013-12-15 03:56 · #

    Nevermind, a refresh broke this, the images no longer display when I expand.

  11. kelly · 2013-12-15 17:12 · #

    It was user error, MonztA, sorry— I hadn’t deleted the old filters. Now the new filter is working. But Vine vids are still displaying full— no hiding. Any suggestions? If not, no worries— there aren’t many of them on my Twitter feed.

    THANK YOU for creating these fixes! Really, really appreciate it.

    Reply from MonztA:

    The filter for the videos (twitter.com##.js-stream-tweet > .content > .expanded-content > .tweet-details-fixer > .js-media-container[data-card2-name=“player”]) is still working for me.

  12. kelly · 2013-12-17 02:53 · #

    Twitter just broke the new filter. Now ALL pics are displaying (in desktop site).

    Why can’t they just give us the option to hide, like on mobile? Kind of hate Twitter right now.

  13. Patrick Smith · 2013-12-17 10:19 · #

    twitter.com##div[class*=” is-preview”]
    will restore most of the previous functionality.

    Unfortunately, with this custom filter, you will have to click the media link itself, rather than just expanding the tweet to see the content.

    If I find a way to restore clicking on link, I’ll post.

    Merry Christmas!

  14. Patrick Smith · 2013-12-17 12:25 · #

    Replace filter with

    twitter.com##.stream-item:not(.open) .tweet .media

    for the moment, anyway.

  15. me · 2013-12-17 13:31 · #

    Grateful for this but it’s getting awfully tiring having to add new filter after new filter. I know it’s not your fault, but twitter is getting to be more trouble than it’s worth.

Commenting is closed for this article.