Question

I have a really weird issue. I use the Facebook Open Graph, Google+ and Twitter Card Tags plugin to create open graph tags for my wordpress pages. Normally this works smoothly. It takes the first image of a page and uses it as the og:image tag.

Example page: https://ungehorsam.org/programm/geschichten

The created tag (see HTML code of page linked above) looks like this:

<meta property="og:image" content="https://ungehorsam.org/wp-content/uploads/mlk_web.jpg"/>

However, I have one weird problematic page. The page does not load: https://ungehorsam.org/programm/empty-cages

I inspected the HTML code and it seems that it stops right where the facebook open graph tags should appear. It turns out, that if I remove the image from the post, the page loads normally. Also: If I use a different picture than this one, the page renders as expected. It seems that only when I use this specific picture, the open graph tags cannot be generated by the plugin.

So I tried:

  • use a different picture than this one => page loaded
  • delete and reupload the problematic picture => page still does not load
  • delete, save the picture with slightly different quality, and reupload it => page still does not load

I ran out of ideas on how to tackle this now. What is the problem with this picture? Why can't the plugin create the open graph tags if this picture is included in the post?

Was it helpful?

Solution

Not a direct answer to your question, but possibly a resolution to your problem.

Downloading the same image from another source likely resulted in an exact copy (hash-wise) since they probably got it from the same source you did. A wild stab in the dark here, but it's possible there's something about the image data or meta-data that doesn't play nice. What you could try to resolve it is to open the image in your favourite editor and remove or change any meta-data in the image and re-save it. Even if there's none in there, re-save it anyway (possibly with a different compression setting to force a completely new file). You could even go so far as to save it as a new data-type, such as png.

If that solves it, then you can move on. If it doesn't I'd say get in touch with the plugin developers and see what they have to say about it.

OTHER TIPS

I would like to help you with this one however I require more information on how you created the post/page that fails. can you update your question to include the text code used to create the failing page or post so I can workout the problem. Another alternative is to use yoast plugin along with WPSSO Core plugin. These 2 plugins will sort all og data automatically. If you prefer to do og data manually then please post your un rendered html from the post / page in question.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top