Creating a theme logo
By default, in Magento 2 the theme logo is always recognized by the system with the name logo.svg. The Magento 2 also recognizes the logo's default directory as <theme_dir>/web/images/logo.svg. So, if you have a logo.svg file, you simply put the file in the right directory.
But if you want to work with a different logo name with a different format, you have to declare it in Magento by using the layout files declaration. We will make a declaration for this new logo in the Magento_Theme directory, because the new logo overrides the Magento_Theme module.
We will override this module by taking advantage of the fallback system. As you may have noticed, Magento has a specific pattern of declaring elements. It's the way that Magento ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access