Chapter 6

Troubleshooting

Common issues and how to fix them

Something not working? Here are the most common issues.

No og:image tag in page source

View your page source and search for og:image. If it’s missing:

  1. Check that the meta tag is in your layout’s <head> section
  2. Make sure the layout is being used by the controller rendering the page
  3. If you’re using content_for blocks, confirm the yield is inside <head>

Image not rendering

If the og:image tag is present but the image isn’t showing up when you share a link:

  1. Copy the og:image URL from your page source and open it directly in your browser. You should see the rendered image or get redirected to one.
  2. Make sure your page is publicly accessible. OpenGraph+ loads your page in a headless browser, so if it hits a login wall, that’s what the social card will show.
  3. Check that your connection URL is correct. It should look like https://$OGPLUS_KEY.ogplus.net followed by the page path.

Wrong page content in the image

OpenGraph+ screenshots whatever your server returns at that URL. If the image shows unexpected content:

  1. Open the page at the same path in your browser and check that it renders what you expect
  2. If you’re behind a CDN or reverse proxy, make sure it isn’t rewriting the path
  3. Check the Customize guide for controlling what gets captured using selectors and CSS

Stale images

If you’ve updated a page but the social card still shows old content:

  1. Check your HTTP cache headers. OpenGraph+ respects Cache-Control and ETag headers from your Rails app.
  2. You can purge the cache for a specific page from your OpenGraph+ dashboard.
  3. See the Caching guide for details on how to set up cache invalidation.