Facebook is picking up the forum logo as the OG image, not the main image at the top of the body of my post. I’ve tried debug/scrape via Facebook og developer debug tool. Nothing changed.
It looks like there is a theme component installed on the site which is messing with Facebook’s crawler. The component is adding this inside the <head>
Images are not supposed to be included in the <head>, so most browsers just ignore them. Facebook’s crawler seems to see the img tag, and end the <head> early. From their debug tool
This magic </head><body> tag does not appear via curl or any browsers. Very strange behaviour from Facebook.
But anyway, the solution here is for you to move the facebook tracking pixel from the </head> section of the theme component, to the Header section of the theme component.
Not sure if I’m missing a connection here, but my problem is that I do not want the forum logo to show up. But instead, the first image in the post to show up.
So if the actual image in the post (a picture of me) were to show up, how does it matter how big the logo is? I guess my question is, why is the size of the logo of concern when I don’t even want it showing in the first place? Hope that makes sense.
I don’t have any custom themes installed. It’s a plain vanilla installation of Discourse. In fact, I don’t even know how to install a theme or plugin for Discourse.
The size of the image is somewhat relavent, because when Facebook can’t find an og:image tag, it picks the largest image on your site. In this case, the logo is larger than the photo, so it picked the logo.
However, Discourse does include og:image tags - they’re just being broken by the theme on your site.
You must do - the facebook tracking pixel is being added by a theme. When I use safe mode, it disappears. Head to /admin/customize/themes, press Edit HTML, and go to the </head> tab. I suspect you will see the facebook code there.