35

Imgur is blocked by two of the private ISPs we use. Is there a workaround without involving tunnelling?

Bear in mind that Filmot (an Imgur mirror) and Flickr are also blocked.

4
  • 14
    The best thing might be if you managed to convince your ISP to unblock it if not for all but for you.
    – N.N.
    Commented Oct 21, 2011 at 17:15
  • 6
    I can't imagine why they would block it anyway Commented Oct 21, 2011 at 19:56
  • 1
    @SimonSheehan: Any internet filter that wanted to block Reddit would probably want to block Imgur as well. It accounts for an enormous portion of Reddit's content (particularly the type that is likely to be blocked) and Imgur indexes its content by subreddit rankings: imgur.com/r/pics
    – Jeremy
    Commented Oct 21, 2011 at 20:23
  • 1
    This goes beyond ISPs: in Turkey and Iran, Imgur based URLs are blocked by the government order (among others).
    – Bruno
    Commented Feb 24, 2019 at 11:59

4 Answers 4

33

Stack Overflow's hosting is managed by Imgur, but it's no longer integrated into the Imgur website in any way. There's no reason to be under imgur.com, a domain that's likely to be blocked by many internet filters because of the amount of porn it hosts.

Switching to something like http://i.sstatic.net/ should fix this problem. (Imgur uses EdgeCast so IP-based blocks are unlikely.) It would also make their URLs host-agnostic, preventing the need for any more mass-replacements of URLs after this one.

...but for all we know this might violate Stack Exchange's deal with Imgur and be impossible for now.

13
  • This would prevent a future Images stackexchange site from popping up, though. :) Commented Oct 21, 2011 at 17:51
  • 1
    Also, http://images.stackexchange.com/ is long. http://i.stack.imgur.com is pretty long, but it's 2/3 the length of your proposal. I suggest http://i.s.tk/ (to be consistent with Imgur's i.imgur) or http://images.s.tk to be verbose. Commented Oct 21, 2011 at 17:52
  • 1
    I like http://i.s.tk/, I've updated my post with it.
    – Jeremy
    Commented Oct 21, 2011 at 17:55
  • 2
    @Kevin Why in the world does it matter if the image URL is "long"? Commented Oct 21, 2011 at 18:49
  • 2
    @MichaelMrozek - So that we can fit it in comments, tweets, etc, so that it's quick to type, so that you can fit ![alt text](link) on one line, so that an inlined link doesn't make it hard to read a paragraph, because I don't want to waste RAM by loading something from a longer domain name, and I want to make my network requests faster. (The last two were a joke, the others weren't). Commented Oct 21, 2011 at 18:55
  • 3
    @Kevin I'm pretty sure every one of those reasons is ridiculous, but I get the opinion the "short URLs are ridiculous" argument is already lost Commented Oct 21, 2011 at 19:02
  • 1
    Since the images are now hosted under the URL http://i.stack.imgur.com, rather than http://i.imgur.com, I was able to persuade our IT people to unblock that particular URL. If your IT folks have a problem with it, just tell them that it's part of Stack Exchange and that Stack Overflow, etc. are hobbled without the images coming through. That should weigh the argument in your favour.
    – RobH
    Commented Oct 25, 2013 at 16:38
  • 1
    @RobH You are forgetting about bureaucracy/regulation keeping such a request stuck in processing for months.
    – nanofarad
    Commented May 22, 2014 at 20:53
  • 1
    @RobH And anyway, I asked my IT Security folks to whitelist i.stack.imgur.com but they refused because "It’s a sharing site and (my company name) proprietary information can be uploaded there – therefore its blocked on those grounds. "
    – pabrams
    Commented Jan 7, 2016 at 20:07
  • 4
    @pabrams With a mentality like that, I'm surprised they're not blocking the Stack Exchange sites on the same grounds...
    – RobH
    Commented Jan 8, 2016 at 17:32
  • @RobH Why stop there? Why not block the entire internet?
    – pabrams
    Commented Jan 8, 2016 at 17:59
  • 3
    As it happens, Reddit, the original heavy user of Imgur, has now switched to self-hosting under their short domain, at i.redd.it.
    – Jeremy
    Commented May 26, 2016 at 5:20
  • Surprisingly, Jeremy, the author of this reply that is upvoted the most, is suspended network wide. Another victim of bad moderation!
    – Tim
    Commented Feb 10, 2023 at 22:07
7

My company's IT admin blocks i.stack.imgur.com, when visiting stackoverflow, the user-uploaded image shows a broken block.

A workaround for me is copying the image url, paste to a new browser tab, add Https in front of it. for example:

https://i.sstatic.net/jbBM4.png

It's annoying, but faster than opening it on my cell phone browser, when I really want to see the image.

9
  • Should be easy enough to write userscript doing it automatically. :) Commented Feb 6, 2015 at 20:26
  • if you use SO for work related stuff, this block can be challenged - you only need to find an example of work-related post that gets harder to read because of blocked image. Save the URLs of that post and image and try image URL in browser, so that it brings up block page. In my experience, this page typically has instructions on how to request unblock...
    – gnat
    Commented Feb 6, 2015 at 20:31
  • ...Do request per instructions, preferably clarifying that it's for "s.imgur" only, not for "general" imgur (I've read somewhere here that s.imgur is typically blocked by accident when block really targets general imgur). Justify that block makes it harder for you to do your job. In (not very likely) case that request doesn't pass, consider asking for advice from your manager, with the same justification
    – gnat
    Commented Feb 6, 2015 at 20:32
  • 1
    @Shadow something like $('img[src^="i.stack.imgur.com"]').attr('src', function() {return $(this).attr('src').replace("http","https")})
    – Rm558
    Commented Feb 6, 2015 at 23:31
  • Yup, that might work! :) Commented Feb 6, 2015 at 23:52
  • 1
    @Rm558 Don't forget code formatting: $('img[src^="i.stack.imgur.com"]').attr('src';, function() {return $(this).attr('src').replace("http","https")}). I'm making an userscript for this right now. Commented Aug 20, 2016 at 1:25
  • How can I create this script and run?
    – LCarvalho
    Commented Jun 19, 2017 at 16:49
  • 1
    throughout the network many, probably most by now, imgur links have been changed to https anyway. do users still find this method helpful for regular use?
    – ocæon
    Commented May 12, 2019 at 12:21
  • @ocæon In my experience, the images embedded in StackExchange already use HTTPS. This workaround did not work for me. Commented Aug 22, 2023 at 0:43
5

Here's my Tamper monkey script that replaces imgur links with a proxy search engine links. It works fine for me better than using a proxy.

Proxy search engine: DuckDuckGO

Tampermonkey: Download

// ==UserScript==
// @name           imgur to duckduckgo
// @description    Replaces all imgur links on reddit with duckduckgo links
// @include        https://*.stackexchange.com/*
// @include        https://stackexchange.com/*
// @include        https://stackoverflow.com/*

// ==/UserScript==

changeImages();
changeAnchors();


function changeImages()
{
    var images = document.getElementsByTagName('img');
    for (var i=0;i<images.length;i++) {
        var p = /imgur\.com/;
        var src = images[i].src;
        var res = p.exec(src);

        if (res!=null) {
            images[i].src = 'https://duckduckgo.com/iu/?u=' + src;
        }
    }
}

function changeAnchors()
{
    var a = document.getElementsByTagName('a');
    for (var i=0;i<a.length;i++) {
        var p = /imgur\.com/;
        var href = a[i].href;
        var res = p.exec(href);

        if (res!=null) {
            a[i].href = 'https://duckduckgo.com/iu/?u=' + href;
        }
    }
}
2
  • 4
    yeah it still effects people, it was effecting me until I found this solution. Best regards... Commented May 12, 2019 at 12:13
  • 1
    Wow, this solution works great! Commented Aug 22, 2023 at 0:52
4

As a follow up, and a potential answer, I don't think it would "cost" much to buy a new url, and let's call it stackur or something like that to host the images. IT will still have the imgur backend, just a different url.

7
  • Why a new domain?
    – a cat
    Commented Nov 23, 2011 at 12:48
  • 1
    @lunboks imgur is blocked by many IT folks
    – dassouki
    Commented Nov 23, 2011 at 12:54
  • 1
    Wouldn't they simply block this new URL for whatever reason they might have for blocking imgur already?
    – Yi Jiang
    Commented Nov 23, 2011 at 12:56
  • 3
    Not really sure about that, I think the issue with imgur is that it's used by lots of media site, has pornographic images on it,
    – dassouki
    Commented Nov 23, 2011 at 12:59
  • @dassouki I meant why a new domain, as opposed to simply using an existing one. Something like i.s.tk (as Kevin Vermeer proposed) or i.sstatic.net should work just fine.
    – a cat
    Commented Nov 23, 2011 at 16:55
  • @lunboks I misread his answer. I'll delete mine in a few minutes so you can read this comment first
    – dassouki
    Commented Nov 23, 2011 at 16:58
  • @dassouki so we just need to find an inexpensive, reliable and accessible image host that will actively monitor the content that is posted there?
    – Ryan Gates
    Commented May 16, 2013 at 20:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .