Hacker News new | ask | show | jobs
by thepumpkin1979 5339 days ago
Very cool, question: How do you know what's the official image of the page? I fetched google.com and it seems to "extract" the right image. However I don't see anything special in the <img> for google.com.
1 comments

A few different ways, it will favour the open graph image or meta 'image_src" tags if there are any. If not, it will take all the image tags on the page and then decide what's relevant based on the correct size and position on the page which is usually fairly accurate.
Nice job!
Cheers :)