Программно добавляем мета

function THEME_page_attachments_alter(&$page) {
  $viewport = [
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => [
      'name' => 'viewport',
      'content' => 'width=device-width, initial-scale=1, user-scalable=0',
    ],
  ];
  $page['#attached']['html_head'][] = [$viewport, 'viewport'];
}

 

function THEME_page_attachments_alter(&$page)
{
  $img_url = "path/to/image";
  $og_image = array(
    '#tag' => 'meta',
    '#attributes' => array(
      'property' => 'og:image',
      'content' => $img_url,
    ),
  );
  $page['#attached']['html_head'][] = [$og_image, 'og_image'];
  $og_description = array(
    '#tag' => 'meta',
    '#attributes' => array(
      "property" => "og:description",
      "content" => t("Lorem ipsum"),
    ),
  );
  $page['#attached']['html_head'][] = [$og_description, 'og:description'];
}