It looks like the og:image will sometimes use an image from discourse, for example a user’s avatar if you link to that user. However if you link to a topic or topic list that doesn’t have an image it will use your site logo by default, like you discovered.
There is no way currently to overwrite this, but it wouldn’t be too difficult to add a site setting like we do for logos and such to configure it, if you feel like submitting a pull request we’d definitely accept it
I assume your example is only for topics. There is no default og:image for index, categories etc. This way…well in my particular case I prefer having one image as main default og:image. I am planning Facebook campaign for new community and index page logo/image is important.
It seems Discourse is still generating the og:image tags from logo url in Admin > Settings > Required. For posts that don’t have images, is there somewhere else Discourse checks for an image to use instead of the logo for the OpenGraph tag?
For a use case example: I have a topic with a lovely Vimeo Openbox embed, and the best Facebook can do is scrape and find the site logo, which is formatted to fit in the header, which has almost nothing to do with Facebook’s specs or the post.
It would be cool if there was a series of checks that Discourse would go through to generate the most relevant og:image tag.
Perhaps (from least to most relevant):
Default Image (could be a new field in Admin > Settings > Whatever?)
Tag Image (first tag?)
Onebox scrape (from Vimeo, YouTube, etc. thumbnails)
The ability to set a default site image that’s specifically chosen for sharing, and is not the site logo, would cover most of my aesthetic needs.
Upon further discovery while testing and writing the above: I dunno. When I look in Facebook’s Object Debugger, it shows images that seem to be page scrapes. Further, there is no og:image tag in my HTML source. The links @DeanMarkTaylor posted lead me to believe there should be a tag there, but I have everything populated in the Required settings and there’s still no image (other og tags are present). Is this set up the way I want it to and I’m just missing a setting elsewhere?
Are we privy to the rationale of the request/removal’s implementation?
Leaving it all up to chance and Facebook (Google, Twitter, etc.) doesn’t seem like a best practice, but if there’s a compelling/structural reason it can’t be handled otherwise I can move on to other concerns.
As it stands, the only way for a topic to display nicely when shared seems to be somehow socially engineering users to add an image that conforms to myriad guidelines and technical specifications in each topic–a rather unlikely scenario.
Is there anyway we can pin a fix to this so people can easily identify it. Better still add a function to an update so we can know if its a 800x800px square .png that works perfect or a rectangle 1200x627px .png for the default sharing image.