Skip to content

Instantly share code, notes, and snippets.

@jlewin
Created May 5, 2013 18:31
Show Gist options
  • Select an option

  • Save jlewin/5521698 to your computer and use it in GitHub Desktop.

Select an option

Save jlewin/5521698 to your computer and use it in GitHub Desktop.
Fallback for cases where no OpenGraph or RichSnippet image exist and websnap fails. Modeled after the behavior exhibited by Google+
var images = document.querySelectorAll('img');
for(var x in images) {
var w = parseInt(images[x].getAttribute('width'));
if(w > 100)
console.log(images[x].src);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment