Skip to content

Instantly share code, notes, and snippets.

@abelaska
Forked from coolaj86/README.md
Created July 4, 2018 15:02
Show Gist options
  • Save abelaska/f76fbe9d7a3a03b884a2bdf939bb81d3 to your computer and use it in GitHub Desktop.
Save abelaska/f76fbe9d7a3a03b884a2bdf939bb81d3 to your computer and use it in GitHub Desktop.
Let Google cache and resize your images
function getUrl(width, url) {
return 'https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy'
+ '?container=focus'
+ '&resize_w=' + width
+ '&url=' + url
;
}
getUrl(250, 'http://andshelived.files.wordpress.com/2008/10/killer-mater.jpg');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment