Actions

Template

Ogmeta

From InfoTechPedia

Revision as of 11:01, 3 November 2020 by TomHutchison (talk | contribs) (Created page with "<includeonly>{{#set: |Meta element og-image=https:{{filepath:{{#sub:{{#explode:<MANY>{{#show: {{FULLPAGENAME}} |?Attachment_link|format=array}}|<MANY>|1}}|5}}}} |Meta el...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template automatically adds the og meta tags, og:image, og:image-type, og:image-height, and og:image-width.

{{#set:
   |Meta element og-image=https:{{filepath:{{#sub:{{#explode:<MANY>{{#show: {{FULLPAGENAME}} |?Attachment_link|format=array}}|<MANY>|1}}|5}}}}
   |Meta element og-image-type={{#show: {{#show: {{FULLPAGENAME}} |?Attachment_link|link=none }} |?MIME type }}
   |Meta element og-image-width={{#show: {{#show: {{FULLPAGENAME}} |?Attachment_link|link=none }}#_EXIFDATA |?Width }}
   |Meta element og-image-height={{#show: {{#show: {{FULLPAGENAME}} |?Attachment_link|link=none }}#_EXIFDATA |?Height }}
  }}