Skip to content

Instantly share code, notes, and snippets.

@nblenke
Created January 28, 2014 14:30
Show Gist options
  • Save nblenke/8668677 to your computer and use it in GitHub Desktop.
Save nblenke/8668677 to your computer and use it in GitHub Desktop.
Use Google's Image caching/optimization proxy to resize an image
(function () {
var img = document.createElement('img');
path = encodeURIComponent('https://s3.amazonaws.com/llama0/burningfiremonkey.gif'),
width = 600,
refresh = 2592000;
img.src = 'https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?url=' + path + '&resize_w=' + width + '&container=focus&refresh=' + refresh;
document.body.appendChild(img);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment