Resource icon

xF1 Add-on Facebook’s Open Graph Image or og:image For Forums and Threads 1.0.0

No permission to download
Compatible XF Versions
  1. 1.5
XenForo’s open graph image is sitewide and you can’t specify different images to different forums and threads. It becomes boring on social media where images are a major part of making content go viral.

Thanks to @vlom31 of HackerDeCroissance for sharing the idea, paying me to develop it and then allowing it to share it.

With this plugin, you have different open graph images for forums and threads. The forum open-graph images are to be uploaded via FTP. For threads, admins and moderators can upload images to be used as open-graph images or specify external url.

How To Install The Plugin?

Unzip the file. It contains an upload folder, an XML File named addon-OG.xml and a Readme.html file.

Inside upload folder there is a library folder and data folder.

Upload files and directories inside library to XenForo’s library directory, thereby creating a directory named OG inside the library folder on your server.

Very detail instruction with screenshots to install any addon is here.

Inside the data folder, there is a nodesog folder. Put all the Open Graph Images for each forum in the format FORUMID.jpg

The forum id is the one that you see in the url window when editing the node in the admin area.


So 6 is the node id in the screenshot above. So the ogimage for this forum will be 6.jpg inside the nodesog folder. (Keep the extension in lower case as Unix and Linux servers are case sensitive and 6.JPG is not same as 6.jpg)

Now import the .xml file using XenForo add-on importer.


Facebook Scrap Information.


Edit a thread and upload the ogimage url. You can even specify an external url for ogimage.

The Open graph title is just in case you do not wish to use the thread title on social media and want to be using a custom title for threads.

Precedence for OG Images

The default og:image inside the style properties won’t be used for any thread or forums and it will be only for the homepage and other than forums and thread pages.

For forums, images in the nodesog folder will be served for open graph images.

For threads, the order of precedence for open graph images is as follows:

  1. First choice is url of the image specified.
  2. Second choice is the uploaded image for the thread.
  3. Last it will revert to the image for the forum.
The plugin doesn’t honor attachment view permissions which mean even if the attachments are set to be visible only to members, the images uploaded via this plugin will be visible to everyone.

What is the preferred dimension for images?

Facebook recommends the width to height ratio to be 1.91. I prefer to keep it at 800px wide and 418 px height but you are free to use any preferred dimension of your choice.

Error attachment too big?

If you find an issue of the file too large when trying to upload a file.


Make sure your attachment settings allow upload of bigger files.


The settings are same for all the attachment and are under Admin > Options > Attachments.

What if FB still can’t pull the og image?

This can happen at times when FB does not pull things from the server and uses its own cache.

View the source code of the thread page to see if it contains og:image tag?

If the answer is yes, FB is pulling the data from cache. Use Facebook’s sharing debugger tool to rescrape the content from the server again.

If you don’t see the og:image tag, you may be using a custom theme and my template modifications aren’t working as expected. Share them in comments here or on my blog and I will be more than happy to help you.
  • Like
Reactions: alexalx, Chan, dogstyle007 and 4 others
17.6 KB
First release
Last update

Similar resources

8thos Bar (Facebook-Like Floating Menu with Avatar and Search Box)
Floating User Bar With Avatar, Style Selector, Back to Top and Search Bar
0.00 star(s) 0 ratings
Use the first image found in a [img] or [attach] tag to populate the og:image field
0.00 star(s) 0 ratings
Open All Links (even internals) In New Tab Admin
Open all links in your xenforo in new tab
0.00 star(s) 0 ratings
Open PDF AnimeHaxor
This will make PDF attachments open in the browser.
0.00 star(s) 0 ratings
Plot users / guests online on your forum with Munin
0.00 star(s) 0 ratings
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I Disabled AdBlock