I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!
(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)
https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy
url
: original image URLcontainer
: must be "focus" (i dunno lol)refresh
: time (in seconds) to cache it on G's serversresize_w
: width in pixelsresize_h
: height in pixels
You can either specify both resize_*
parameters or just one.
Let's resize that big panorama picture I took in Istanbul last year.
Make it square, 300x300px:
https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F7298%2Fblog%2FBlick_von_der_S%25C3%25BCleymaniye-Moschee.jpg&container=focus&resize_w=300&resize_h=300
Make it 750px wide and keep the aspect ration:
https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F7298%2Fblog%2FBlick_von_der_S%25C3%25BCleymaniye-Moschee.jpg&container=focus&resize_w=750
At least in Chrome, opening the URL in the browser will force a download of a text file (which is actually a JPG). Putting the URL in an <img>
tag is fine. Or just use curl
.