Twitter Summary Card with Large Image

geekgasm

Member
I think for gallery images, it is best to use Twitter Summary Card with Large Image instead of the Summary Card.

Code:
<meta name="twitter:card" content="summary">

to

Code:
<meta name="twitter:card" content="summary_large_image">

Is it possible to implement this with template edits?
 
Upvote 0

frm

Well-known member
Yes. In the template xfmg_media_view find:
PHP:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$descSnippet}"
    arg-shareUrl="{{ link('canonical:media', $mediaItem) }}"
    arg-imageUrl="{$mediaItem.getCurrentThumbnailUrl(true)}"
    arg-canonicalUrl="{{ link('canonical:media', $mediaItem, {'page': $page}) }}" />
Replace with:
PHP:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$descSnippet}"
    arg-shareUrl="{{ link('canonical:media', $mediaItem) }}"
    arg-imageUrl="{$mediaItem.getCurrentThumbnailUrl(true)}"
    arg-canonicalUrl="{{ link('canonical:media', $mediaItem, {'page': $page}) }}"
    arg-twitterCard="summary_large_image" />
Basically just adding arg-twitterCard to the mix at the end.
 
Top