Change record status: 
Project: 
Introduced in branch: 
8.6.x
Introduced in version: 
8.6.0
Description: 

Previously a theme would have to have a filename named "logo.svg" to get Drupal to display this as the default logo. One could override this logo by uploading one, but there was no way for a theme developer to specify what file to use as a logo, or to use another format than svg.

Now you can specify a path to an image you want the theme to use. In a mytheme.info.yml file, you can specify:

core: 8.x
type: theme
name: 'awesometheme'
description: 'My awesome theme'
logo: 'images/logo.png'
Impacts: 
Module developers
Themers

Comments

wolf_22’s picture

Is this approach supposed to work if your theme exists at sites/all/themes/? (Using 8.8.6, it doesn't seem to.)

This is using the following entry in my *.info.yml file:

logo: 'sites/all/themes/mytheme/logo.svg'

(Because omitting that had no impact and my theme, according to my markup, kept expecting the logo to exist in themes/custom//logo.png. Maybe this approach overlooks the scenario that a prior logo location could've previously existed using a *.png file?)