Instructions for Creating OG:IMAGE tags for Xenforo 2

XenForo Instructions for Creating OG:IMAGE tags for Xenforo 2

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
XenForo 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:
<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:
<xf:set var="$og_image" value="0"...

Read more about this resource...
 
Back
Top Bottom