staking-launchpad icon indicating copy to clipboard operation
staking-launchpad copied to clipboard

Broken OG image

Open samajammin opened this issue 4 years ago • 7 comments

Current open graph image is broken Image 2021-03-08 at 1 26 09 PM

Should be: https://launchpad.ethereum.org/static/media/eth2-leslie-rhino.243747b9.png

samajammin avatar Mar 08 '21 21:03 samajammin

I tried with updated https://pyrmont.launchpad.ethereum.org/, it seems we still have problems with Twitter card: image

@samajammin any ideas?

hwwhww avatar Mar 09 '21 09:03 hwwhww

Hmmm ya I see that same issue.

It does appear to work fine w/ Facebook debugger: Image 2021-03-16 at 7 30 38 AM

Not sure why Twitter reports errors... it should fall back to Open Graph metadata 🤔 but we can add twitter-specific metadata just to be sure.

samajammin avatar Mar 16 '21 14:03 samajammin

It seems that it still doesn't work with Twitter. 😭

image

hwwhww avatar Mar 16 '21 16:03 hwwhww

Hmmm so this is with https://github.com/ethereum/eth2.0-deposit/pull/381 deployed, ya?

samajammin avatar Mar 18 '21 15:03 samajammin

@samajammin yes, that was after Pyrmont release on March 17th: https://github.com/ethereum/eth2.0-deposit/pull/382

hwwhww avatar Mar 18 '21 16:03 hwwhww

Ultimately I suspect this is an issue with the fact that the site is not server-side rendered. We need dynamic tags (so that every page doesn't have the same title tag / meta description) but in doing so, the tags are not in the static HTML. I suspect Twitter's crawlers don't run the the JavaScript on the site; they simply take the meta tags from the initial bundle.

Might require a more intensive fix than I hoped 😕 I was hoping Twitter's crawlers were smarter.

samajammin avatar Mar 18 '21 16:03 samajammin

More on this:

  • https://stackoverflow.com/questions/59222217/twitter-card-meta-tags-work-in-index-html-not-in-react-helmet
  • https://dev.to/zorfling/can-i-use-react-helmet-to-add-social-card-meta-tags-for-twitter-and-facebook-4a36

samajammin avatar Mar 18 '21 16:03 samajammin