After Drupal 8.6.x
In your THEME.info.yml
add a line like logo: logo.png
. You need to clear cache for Drupal to detect this change.
Before Drupal 8.6.x
Default logo file has now become logo.svg
in Drupal 8. However, to use logo.png
or something else, you need to add custom settings definition in your theme. To do this, add the following lines to config/install/THEME.settings.yml
file in your theme folder (replace THEME
with your theme's machine name).
logo:
path: 'themes/THEME/logo.png'
use_default: false
After doing this, you must reinstall your theme if already installed. The file asks Drupal to install the given settings when the theme is installed. Hence, when you install the theme, the logo path
parameter gets saved to the database and the default logo is disabled by the use_default
parameter.