115

My organization's proxy blocks https://i.stack.imgur.com/, and they refuse to lift that block.

Is there any way for me to work around that to see screenshots and images users post in questions? While most questions don't include images, the entire meaning of other questions is based on those images.

16
  • 33
    That's a real shame. i.stack.imgur.com is probably one of the safest image domains there is, unless their real motivation is that they don't believe you need it for work-related reasons, or that they simply lack motivation altogether.
    – Robert Harvey Mod
    Commented Jun 24, 2014 at 19:48
  • 41
    Open a Google Drive document, add an image from a url. It's bad, but it's what I do.
    – gunr2171
    Commented Jun 24, 2014 at 19:49
  • 6
    @gunr2171: Not much help for images that are already posted by other users.
    – Robert Harvey Mod
    Commented Jun 24, 2014 at 19:50
  • 1
    I'm curious why they have that block in place o.O
    – Cerbrus
    Commented Jun 24, 2014 at 19:53
  • 5
    @RobertHarvey, as long as the post has an image url (not a link to a page with an image on it), this will work, no matter who posted it. You just have to view the source of the post to get the url.
    – gunr2171
    Commented Jun 24, 2014 at 19:54
  • 4
    @gunr2171: I think you're missing the point. Most people don't post images that way.
    – Robert Harvey Mod
    Commented Jun 24, 2014 at 19:56
  • 11
    @Cerbrus: It's probably a block for the entire imgur.com domain.
    – Robert Harvey Mod
    Commented Jun 24, 2014 at 19:58
  • 2
    @RobertHarvey, ok (as much as I don't want to argue), the normal way people post images is with the "image" editor button, which puts markdown in the post and a url (for i.stack.imgur) at the bottom. So I notice there is a screenshot missing, open up the post for edit, and get the url from the bottom.
    – gunr2171
    Commented Jun 24, 2014 at 20:00
  • 1
    @gunr2171: The url will contain an i.stack.imgur.com link, 99 percent of the time. What?
    – Robert Harvey Mod
    Commented Jun 24, 2014 at 20:01
  • 29
    @RobertHarvey, and that's fine. Adding an image by url (even an i.stack.imgur.com link) in google docs will go around a proxy.
    – gunr2171
    Commented Jun 24, 2014 at 20:03
  • 40
    Have you considered seeking employment elsewhere...sounds like you're working for tyrants...! Commented Jun 24, 2014 at 23:47
  • 5
    @gunr2171 how about posting that as an answer, it sounds like the best solution (simplest, safest, most likely to work, least likely to end in a disciplinary tribunal...). Make it clear that it works by Google's server downloading the image from imgur, then you accessing the image from Google's servers, which are (hopefully!) not blocked. Commented Jun 25, 2014 at 14:02
  • 2
    It's probably safe to assume that if imgur.com is blocked, the user doesn't have any admin rights beyond the bare essentials. Commented Jun 25, 2014 at 14:05
  • 1
    @JRG-Developer My company is large and not development focused. I'm sure they are just trying to avoid exceptions wherever possible, and most employees probably don't need to go to imgur.com. I can't legitimately argue that I even need to, despite regularly finding work related material on this site.
    – user1454117
    Commented Jun 25, 2014 at 14:53
  • 8
    Stack Overflow needs to employ these blocks so people can see why link-only answers are so highly frowned upon.
    – BoltClock Mod
    Commented Jun 25, 2014 at 16:46

11 Answers 11

30

You can quickly see image thumbnails for all images on a page using the Google Image Search thumbnails, which come from Google's gstatic.com server. Hopefully your employer hasn't blocked Google!

  • Copy the URL of the question page
  • Prepend site: and paste it into Google Image Search. You might need to tinker with or shorten the URL, removing the SEO stuff like the question title keywords.
  • You'll get thumbnails of all the images on that page, served from Google's gstatic.com server, or as base64 JPG/PNG data written into the source of the (Google-origin) page.
  • Then, if there's an image you need to see in more detail, you may be able to do the Google Docs trick in gunr2171's answer on this page to see the full thing.

This is ideal if you can't muck about with proxies, DNS routing, etc due to company policies or privilege restrictions (which is very likely if imgur's blocked).

The downsides are, it only works for questions old enough to have been indexed by google, so it might not work for questions or updates less than, say, an hour old, and it only gives a smallish thumbnail. So, fine for research if you don't need fine detail, but not so good for answering new questions.

For example using a graphic design question with several images (I realise this image won't help the asker until this page is indexed...):

enter image description here

...the images are coming from Google, not from the original (blocked) source.

3
  • 2
    The company I work for blocks imgur.com, and until I convinced them otherwise, this also included i.stack.imgur.com. If you ask them nicely and tell them that without permission to view images on i.stack.imgur.com, many answers on the SE network depend on images that hare hosted there and don't make any sense without them, they may make i.stack.imgur.com an exception to their imgur.com ban like my organization did. Good luck!
    – RobH
    Commented Jun 15, 2016 at 17:12
  • "Your search - site:i.imgur.com/y4U4kME.png - did not match any image results." What am I doing wrong? Commented Nov 16, 2016 at 14:26
  • 3
    @Aaron You should search on the url of the question page, not the image. So for example to see thumbnails of the images on this page, search on site:http://meta.stackoverflow.com/questions/261455/ (removing the SEO gumpf from the URL to give the shortest URL that's specific to this page) Commented Nov 16, 2016 at 14:35
36

Another proxy is using duckduckgo image results page,

The img link: https://i.sstatic.net/QFJ9d.jpg

Becomes like this: https://proxy.duckduckgo.com/iu/?u=https://i.sstatic.net/QFJ9d.jpg

7
  • @Kyll Weird, I can see it, curl and wget it just fine from my local machine and headless server.
    – Arda
    Commented Aug 19, 2016 at 16:50
  • That is strange, works fine in Chromium but 403s in FF Dev Edition. Oh well.
    – Kyll
    Commented Aug 20, 2016 at 13:19
  • 1
    @Kyll Uhm.. Works for me on FF, but not dev edition installed: i.imgur.com/DiTyRdo.png
    – Arda
    Commented Aug 21, 2016 at 12:21
  • Maybe it has something to do with localization? I'm in France.
    – Kyll
    Commented Aug 22, 2016 at 15:57
  • 3
    @Kyll Hmm weird, it's now 403 on Chrome for me as well, but if I add gibberish salting to url such as &hodor=hodor1 it works nice.
    – Arda
    Commented Aug 22, 2016 at 20:30
  • 1
    Woah, this is weird. Reproduce and confirmed Hodor fix. Maybe get in touch with DDG about this?
    – Kyll
    Commented Aug 22, 2016 at 20:56
  • How can I automate this?
    – internet
    Commented Apr 2 at 17:03
33

The trick I use is loading the image in Google Docs. It's time consuming, but it works. Here are the steps to use:

  1. Edit the post so you can see the source. Grab the image url (either inline or at the bottom of the post.
  2. Open a Google Document, preferably a Word Document.
  3. In the "Insert" menu, choose "Image". enter image description here
  4. On the left menu, choose "By Url", then paste the url in the box. If all goes well, you will see the image. You can insert it into the document to see it larger. enter image description here

Bewarned about links that don't go to i.stack.imgur. If the link goes to a page that contains the image, then this trick won't work. Then you just have to wait until you get home.

The reason why this works is because it's Google's servers that are downloading the picture, which can get to the sites that are blocked for you.

10
  • 3
    Thanks for posting this. I had no idea there was a way to see the images while I'm at work, this is really nice.
    – pixelmeow
    Commented Jun 25, 2014 at 19:33
  • 8
    drive.google.com is blocked for me too, so this won't work. Commented Jun 25, 2014 at 20:33
  • Haha, good one. Now about that HTML pages [...] ;) Commented Jun 26, 2014 at 15:08
  • 21
    It is kind of ironical that your steps include pictures hosted at imgur. Commented Sep 24, 2014 at 11:27
  • 1
    @Shedal, yo dawg, I herd you like unblocking photos, so I put some photos in my post about unblocking photos so you can practice while you learn! Also, stack's imgur is the best place to put images, as they don't 404 after a while.
    – gunr2171
    Commented Sep 24, 2014 at 12:21
  • @gunr2171 it's just that these images are part of your instructions for seeing imgur images. People who would follow these instructions don't yet see the images. So having them there doesn't make much sense. Commented Sep 24, 2014 at 16:05
  • @Shedal, agreed that it's sort of backwards, but the text instructions should be enough. The images are just reinforcing the written steps. If you want to add more text to make it more clear, go for it!
    – gunr2171
    Commented Sep 24, 2014 at 16:21
  • @gunr2171 I simply pointed out the irony. Commented Sep 24, 2014 at 20:09
  • 2
    I stop at step 2, then I copy + past the content to google document. Commented May 25, 2016 at 10:47
  • You saved my Time :) Commented Feb 1, 2018 at 4:12
17

So inspired by James' answer about using Greasemonkey, I wondered how tough it'd be to hack up a quick JavaScript snippet that'd swap out image sources.

The below code will swap out all images whose sources start with i.stack.imgur with their counterparts from archive.org. To be clear, this puts the images on the page you're viewing, which is ideal, I think.

$("img").each(function(ignore, e) { 
    var $e = $(e);
    if ($e.attr("src").startsWith("http://i.stack.imgur")) { 
        $e.attr("src", "http://web.archive.org/web/" + $e.attr("src"));
    }
});

To run this easily, you'll need to access a developer console for your browser of choice (often brought up with F12 if on Windows). I'm using Firebug, but I bet Firefox's normal, built-in tools work too.

(You could also use Greasemonkey, though this is easy enough I'm not going to bother. It looks like recent versions of Greasemonkey have some trouble, and it's not a big deal to bring up dev tools. Still, Greasemonkey 2.3.1 seems stable, and it'd be easier to use than having this code in a txt file somewhere to paste over and over.)

Note: Originally I was going to try some way of using http://images.google.com, but that's blocked for me right now too! Archive.org is not, though my guess would be that fewer images are stored there than images.google, and I wonder how quickly answers are indexed. You'll still miss some images, especially recent ones, using this technique.

This did work for the image-intensive answer I'm currently viewing. Wish I'd done this months ago. Stupid. ;^) Guess I should go contribute now.

1
  • 1
    Could you not save the snippet as a bookmark and then click on it whilst on the page, rather than fiddling with the dev options or installing greasemonkey?
    – iamdave
    Commented May 20, 2019 at 13:29
7

If you're running a browser that supports Greasemonkey and you're able to get to an open proxy service, you should be able to write a page script that munges all the imgur URLs.

I found someone on reddit with a similar problem that posted a script that might work.

4
  • 15
    If a company is blocking certain websites, they will certainly be aggressively blocking all external proxy services. It is also probably strictly against company policy to try to use an external proxy.
    – Ian Goldby
    Commented Jun 25, 2014 at 11:57
  • It's also probably not just a request URL filter. Commented Jun 25, 2014 at 12:33
  • 6
    It's probably also against company policy to try to circumvent restrictions like this.
    – Chris
    Commented Jun 25, 2014 at 13:47
  • 1
    @Ian Goldby: It's also possible it's just a standard setting of the browser content filter, and the network admin does not know what he does or that this setting blocks SO. Commented Jun 26, 2014 at 15:06
7

You can use FoxyProxy (also exists for Chrome) and do a SSH port forwarding to your machine at home ;)

To create the tunnel:

ssh -D 8080 [email protected]

Then you use FoxyProxy to connect FireFox/Chrome to your local port 8080 (if you have no admin rights, use a Port > 10'000).

If port 22 (SSH) is blocked, you can set the SSH daemon at home to listen at the SSL port, that almost always works, at least for me ;)

You can also tell Firefox to use the proxy for DNS-resolution already ;)

For Windows, you need PUTTY for the SSH tunnel:
http://www.hostdime.com/resources/browsing-internet-ssh-tunnel-windows/ or you can use the ssh in git-bash in git-scm. Works fantastic. With SSL-Port: ssh -D 10001 [email protected] -p 443
With git-scm, you can even use RSA private-public keys, especially when you don't have admin rights, and going through putty-gui is just too slow.

To generate a RSA-key (4096 bit) for the ssh-daemon, execute

ssh-keygen -t rsa -b 4096
cat ~/.ssh/id_rsa.pub >> authorized_keys

you need to generate the key on the client, then take the id_rsa.pub in the ~/.ssh folder and echo the text in id_rsa.pub in ~/.ssh/authorized_keys on the server for the user you want to use.

That's much safer than using a PUBLIC proxy that can't be trusted (those cursed moments when you forget to switch the proxy off), and you can switch it on/off in an instant.

Also, if you connect to the SSH server, use the IP instead of the servername, that way DNS-blocking will not be able to stop you.
If you have no admin rights, use PortableApps (for both Firefox and PuTTY, Chrome doesn't need admin rights for installation).

All the network admin will see is a SSL connection to your home server IP.
That's much safer anyway.
No more monitoring of your browsing activity, no more blocked sites, no more traces.
Everything is encrypted.

5
  • 41
    Beware - trying to use an external proxy will probably be against your company policy, and might be a disciplinary offence.
    – Ian Goldby
    Commented Jun 25, 2014 at 11:58
  • 2
    @Ian Goldby: Yep, for risks and side effects, read the package leaflet and ask your doctor or pharmacist (or lawyer). Though I very much doubt any company other than a big bank/multinational with illegal activities does actually have such a policy. Commented Jun 25, 2014 at 12:02
  • 11
    I work in a large multinational energy company that has such a policy. I believe it is pretty standard practice in large companies and has nothing to do with trying to hide illegal activity. I suspect the usual reason is to prevent drive-by browser exploits and time-wasting. (eBay is completely blocked where I work. I suspect people have been caught in the past trying to run an eBay business during work hours.)
    – Ian Goldby
    Commented Jun 25, 2014 at 12:13
  • 9
    Tunnelling out through a firewall is an obvious security risk and will be prohibited by all but the most hippy IT departments. Commented Jun 25, 2014 at 12:34
  • @IanGoldby, yeah, part of the boilerplate techo-babble T&Cs. I'd say a lot of companies have it even if they don't realise it or enforce it. Commented Jun 25, 2014 at 13:39
6

I've created another Userscript that accomplishes this, and I believe it does a better job than my other answer because it avoids the issue of newer images not loading by actually sending the picture to a proxy service which returns a working image.

I've made a userscript that I call Image Wizard. Image Wizard will take links and images from given domains with a real proxied version of the image (currently from bypass123.com, but this is easily changeable.)

This will make all images (from imgur.com and facebook.com by default) inside content posts on Stack Overflow look like this:

enter image description here

And links in comments will be changed to [Image Wizard]:

enter image description here


Any link/image that is converted by Image Wizard when clicked will open in a new tab.

The project is hosted on GitHub.

Image Wizard can be installed through GreasyFork.


Update 5/2/18 - Added an automated method of detecting when images are added to DOM instead of running the function every x seconds. Method - new version v1.5.

4

NOTE: This is somewhat outdated. It still works fine as of 5/1/2018, but I've written another userscript that seems to work a bit better.


I've created a new tampermonkey script specifically for this purpose called Image Proxier.

This will replace all links from ["https://i.sstatic.net/", "https://i.imgur.com/"] with links from http://web.archive.org/web/ (by default, this can be changed relatively easy).

This userscript works for images both in questions/answers, and also comments. In comments it will convert links to images into a thumbnail and collate them all together at the top of the comment. Here is an example of comments with 1 or 2 images:

enter image description here

You can then click on the image to see a bigger version of it:

enter image description here

On images inside questions, it will similarly collate all of the images together, but only ones near eachother in paragraphs. If multiple images exist in a paragraph, they will all be collated together right above where they originally had been.

enter image description here

NOTE: Images posted may not immediately be picked up by archive.org, they may take some time to actually display the picture.

9
  • It is a nice interface for a chrome user like me. ı may promote to my friends. Though it has a layout bug since at least 1 image here is placed before the div content (In the answer given by Arda). Commented Apr 29, 2018 at 14:22
  • @YılmazDurmaz I'm not sure what you mean by the layout bug, but thanks for your comment! Commented Apr 30, 2018 at 12:46
  • nice question, I can't remember what I have seen and don't see a layout problem in the mentioned post now. It might be possible the page had another problem at the time. By the way, using your script I modified it to use a free proxy page as archive.org won't have freshly added images. you may modify yours as well to use a proxy if image not found preferred source. Commented Apr 30, 2018 at 15:34
  • @YılmazDurmaz What proxy did you use? Could you somehow show me how you accomplished that? Commented Apr 30, 2018 at 15:40
  • I dont want to advertise such site here. I used GM.xmlHttpRequest to use its proxy POST form, and it returns a new link for the images. I think you can find info on how to use GM.xmlHttpRequest and "finalUrl" property of its response. I use my modified version for myself only, but if we share you need to add my name in the scripts writer list :)) Commented Apr 30, 2018 at 16:08
  • @YılmazDurmaz I'm fine with adding your name to the writer list if you want to contribute some code. I use this proxier daily because the network I am usually on has imgur blocked, if I could make it work better then great! Feel free to contribute through the github project Commented Apr 30, 2018 at 16:11
  • OK, check it on this temporary gist. I will delete it in a few hours. you can add me as a Collaborator on your project: "yilmazdurmaz". Commented Apr 30, 2018 at 16:38
  • @YılmazDurmaz I'm working on a complete rewrite of this script right now to be released as "Image Wizard" instead Commented May 1, 2018 at 18:32
  • I am new to git and yet learning how to use forks and pulls. depending on how busy I am, days or weeks later I may propose my changes :) Commented May 2, 2018 at 22:00
4

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;
        }
    }
}
-1

You should add a comment requesting that the post is edited (or edit yourself if able) so that it doesn't rely on the images. This includes adding proper alt text (replacing "enter image description here") and transcribing code into code blocks.

This is already Stack Overflow policy, but unfortunately many posts do not follow it.

Not only does this issue affect networks that block imgur (such as corporate, free WiFi, or ISPs in certain territories) but also anyone using a text-based browser or anyone with a visual impairment.

3
  • 1
    Doesn't help for supplemental images, or sites where images actually are a vital part of posts, or posts here on SO where the images still demonstrate stuff already included in the answer. You can't create and enforce a "no images policy" as an answer to this. Commented May 20, 2019 at 13:20
  • 2
    @Zoe a "no images policy" is exactly as ridiculous as a "no external links policy". However, a "post must not wholly rely on external images" policy is exactly the same as a "post must not wholly rely on external links" policy, which is what we have. The problem is that people don't think of an image as an external link, when that's exactly what it is.
    – OrangeDog
    Commented May 20, 2019 at 13:22
  • 1
    @Zoe When we say the question can't rely on images, we mean that the question still has to be clear if the images can't be seen. The images can be there (assuming they aren't just screenshots of text) but you have to tell people what's important about the image.
    – BSMP
    Commented May 20, 2019 at 13:32
-3

If you have a home computer, it wouldn't be too hard to whip up a node.js program that'd let you run a proxy.

In fact...

req.pipe(request(siteURL)).pipe(resp)

...that's a one line proxy right there. You could simply bounce the url through to the server with a command line, or maybe write a simple webpage that'd go ahead and display the image for you.

2
  • 1
    The proxy solution was already mentioned, but it has problems, given that any sane IT department will look very poorly on open external proxies like this, because they allow circumventing all policies and oversight. Commented Jun 15, 2016 at 22:50
  • 1
    @NathanTuggy a sane IT department wouldn't go about blocking imgur in the first place.
    – Geeky Guy
    Commented Aug 15, 2016 at 17:43

You must log in to answer this question.