Streaming live at 10am (PST)

Get OG attribute using JavaScript

I want to display the open graph image from a url. In my collection I have url field and from that I want I want to display the og attribute from that url.

Is it possible to get that from JavaScript?

It depends on the site.

Possible if it a Webflow site?

I’m also interested in the actual JavaScript snippet :blush:

Then no, since CORS is disabled by default on Webflow sites.

Try it yourself, pasting it in your console and see the result:


If you have a server-side proxy you can do that.

Ok, thanks a lot @samliew.