This seems like a simple question, but I couldn't find a clear answer when I googled so going to create one.

  • any update for D9/D10 ?
    – Matoeil
    Commented Oct 24, 2023 at 14:42

1 Answer 1


You can add a favicon by just adding a favicon.ico (or .png or .gif or other valid favicon file type) to the root of your custom theme folder.

If you'd like to have your favicon stored in a custom location, see the method described here: (Change default favicon programmatically)


If you simply want to give your theme the ability to change the favicon, without providing one yourself, you can add the setting to your theme settings folder by adding a /config/install/THEMENAME.settings.yml file to your theme, with the following settings:

  favicon: true
  use_default: false
  • has this been tested on drupal9/10? does not work for me
    – Matoeil
    Commented Oct 24, 2023 at 14:43
  • 1
    @Matoeil for Drupal 10 on your custom_theme.settings.yml file use something like favicon: use_default: 0 path: themes/custom/custom_theme_folder/assets/favicon.png
    – Jonatas CD
    Commented Apr 8 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.