core/includes/theme.inc
if (file_exists($favicon = $theme_object->getPath() . '/favicon.ico')) {
$cache[$theme]->set('favicon.url', file_url_transform_relative(file_create_url($favicon)));
}
else {
$cache[$theme]->set('favicon.url', file_url_transform_relative(file_create_url('core/misc/favicon.ico')));
}
- png favicon is supported by all browsers
- jpg and gif is also supported, but those are not the best formats for favicon
- svg is not supported by all browsers, yet
- it is easier to create a (nice) png file than ico
- it is already possible to use png favicon in Drupal, but only ico is supported as a favicon file in the theme folder
proposed change:
1. search for favicon.png
2. search for favicon.ico
3. use Drupal default