Open Osmose opened 9 years ago
After the Open Graph you can look for explicitly declared app icons in the format:
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad-retina.png">
Documentation on how Apple suggests these be set up is here. I'd look for both the current recommended sizes and the old ones listed in the first link.
After that you can look in the root directory for a file with the name apple-touch-icon-152x152.png
looping through the various size options.
Then look for the same set of files with the precomposed suffix apple-touch-icon-152x152-precomposed.png
Worst case you can look for favicon.ico
but I'd only want to use that if it is an actual icon file containing a large icon and not just a 16x16 gif and it'd probably be some amount of work to determine which is the case.
Most of the phones inevitably default to a screen cap when all else fails.
This is a really good article on what the devs are doing to try to make these icons available: https://mathiasbynens.be/notes/touch-icons
Right now for the icon we look for an og:image meta tag and give up if we can't find one, it'd be nice to try looking in a few more common places.