{% load wagtailimages_tags %}
{% if page.get_preview_image %}
    <meta name="twitter:card" content="summary_large_image" />
    {% image page.get_preview_image fill-1200x630 as og_preview_image %}
    {% image page.get_preview_image fill-800x418 as twitter_preview_image %}
    <meta property="og:image" content="{{ og_preview_image.full_url }}" />
    <meta name="twitter:image" content="{{ twitter_preview_image.full_url }}" />
  {% else %}
    <meta name="twitter:card" content="summary" />
  {% endif %}