Instructions for Creating OG:IMAGE tags for Xenforo 2

Instructions for Creating OG:IMAGE tags for Xenforo 2

Admin

Administrator
Staff member
Admin submitted a new resource:

Instructions for Creating OG:IMAGE tags for Xenforo 2 - automatically selecting the largest image file size

Here's how to create og:image tag by finding the file in the post, and automatically selecting the largest image file size.

Open the thread_view template, find the following code:

Code:
Code:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$fpSnippet}"
    arg-shareUrl="{{ link('canonical:threads', $thread) }}"
    arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />

Replace to:

Code:
Code:
<xf:set var="$og_image"...

Read more about this resource...
 
Back
Top