Skip to content
Advertisement

Twitter Open Graph image not showing

I am trying to implement OpenGraph in a website. Here’s my metadata code:

JavaScript

It works fine with Facebook sharing debugger here’s the output: enter image description here

But the image is not showing in twitter card validator: enter image description here

The image I’m trying to show is in my assets folder, here’s the structure: enter image description here

Thank you for helping me.

Advertisement

Answer

Twitter likes name, not property (the OG meta tags use property).

JavaScript

One thing with the Twitter card validator — sometimes is doesn’t seem to rescrape your site when you click the Preview Card button. To test if the changing the code would work, I uploaded a copy of your page to the server for my site, and then scraped it. At first, I got a summary card with no image, but I restarted my browser (closed and reopened) and rescraping the URL and it worked (showed a large image).

Advertisement