Are there any alternatives to `og:image`? What's another way to get an image for a URL?

Viewed 156

On my site I want to accept URLs. Sometimes they'll be image, and sometimes just links. I know FB has Open Graph, where I can query document.querySelectorAll('[property="og:image"]'); to get the reccommended image for the site. I also found that twitter has document.querySelectorAll('[property="twitter:image"]');, but I haven't seen that in the wild.

After checking some sites for an og:image meta tag. I notice that YouTube doesn't have one, reddit doesn't have one. However if you paste a URL for those sites into something like Slack, FB, etc. they're able to pull an image/logo/etc. for the url. Is there another meta tag or attribute I can look for to get an image for a given URL?

0 Answers
Related