Browser wars revisited: The new rules for favicon Icons
Favicons are a big thing again, as every mobile browser reinvents the wheel and in it's own genious and individual way. Try to solve the favicon-quiz on css-tricks.com. You will have fun.
The easiest way is to use a favicon generator like realfavicongenerator.net and check the result using a favicon checker.
Drupal really adds a favicon link, which is depreciated. In Drupal 8 you can remove favicon link using a Page_attached_alter:
/**
* Implements template_preprocess_html().
*
* Search the head elements for the Favicon and remove it.
* See: http://realfavicongenerator.net/faq#why_ico_not_declared.
*/
function YOUR_THEME_page_attachments_alter(&$page) {
foreach ($page['#attached'] as $key => $element) {
if ($key === 'html_head_link' && !empty($element)) {
foreach ($element as $k => $item) {
if (isset($item[0]['rel']) && $item[0]['rel'] === 'shortcut icon') {
unset($page['#attached']['html_head_link'][$k]);
}
}
}
}
}
Check my answer for Drupal 8 on: Stackoverflow