The invocation of the `hook_html_head_alter` was removed from Drupal core. Issue - [Remove invocation of hook_html_head_alter()](https://www.drupal.org/node/2555069). D8 has a new hook to achieve it : [hook_page_attachments_alter()](https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_page_attachments_alter/8). Code from the change record : function MYTHEME_page_attachments_alter(array &$page) { $viewport = [ '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => [ 'name' => 'viewport', 'content' => 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no', ], ]; $page['#attached']['html_head'][] = [$viewport, 'viewport']; }