For Article threads use first article image (if one is available) as opengraph & twitter image

bzcomputers

Well-known member
It would be nice for all threads, but at least for Article threads, with an image available that you use the first thread image as the opengraph & twitter image instead of the current default Xenforo opengraph/twitter image which is typically just your site logo.

An image directly representative of the content and one that is not the same for every thread shared from your site on Facebook and Twitter will likely gain more interest and convert to more traffic.

If the first thread post does not have an image just fallback to using the site logo.
 
Upvote 62
Kier did like this post of mine so... there is hope :p . (an add-on is available that works on 2.1 if folks do not know about it)

 
Kier did like this post of mine so... there is hope :p . (an add-on is available that works on 2.1 if folks do not know about it)

I don't see this in XF2.2 or is only working for articles?
Also, what is the addon?
 
You can set an open graph image for your articles and threads. Follow a few simple steps here https://xenforo.com/community/resources/joyfreak-set-open-graph-image.8121/
There are limits though to using the 'get cover image' function as the OG though, in particular checking the image dimensions for the Twitter minimum sizes and handling if the first post has no attachments but response posts do.

It's why the the other linked add-on uses a different method to set the OG.
 
There are limits though to using the 'get cover image' function as the OG though, in particular checking the image dimensions for the Twitter minimum sizes and handling if the first post has no attachments but response posts do.

It's why the the other linked add-on uses a different method to set the OG.
You can put checks in place to use an image of certain length/width.
 
Back
Top Bottom