Skip to content

Instantly share code, notes, and snippets.

@coolaj86
Last active March 9, 2025 23:59
Show Gist options
  • Select an option

  • Save coolaj86/2b2c14b1745028f49207 to your computer and use it in GitHub Desktop.

Select an option

Save coolaj86/2b2c14b1745028f49207 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');
@SonOfCrypto

Copy link
Copy Markdown

Hi @coolaj86,

I tried to mention you in my README.md, but it is not working. So I hope you will read this :)
I used your function in my responive images code repository https://github.com/janwagner/respio

Thank you :) 👍

@huutai97

Copy link
Copy Markdown

@horasjey

Copy link
Copy Markdown

i have this eror
image
how to solved?

@giaphiep

giaphiep commented Apr 2, 2024

Copy link
Copy Markdown

@jfrenl

jfrenl commented Mar 9, 2025

Copy link
Copy Markdown

Hey! This has become broken since yesterday anyone new endpoints maybe or fixes. Would be very epic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment