-
-
Save longle255/186902a2dd5c18e8d99dd6876c2fdb47 to your computer and use it in GitHub Desktop.
Use Google's Image caching/optimization proxy to resize an image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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