How to Change Default Admin Logo in Magento 2?
Today, we’re going to teach you guys how to change the default admin logo in your Magento 2 store.
In the eCommerce industry, it is crucial to create a strong & positive brand image of a store and a logo is one of the important aspects that directly impact the branding of a store.
In other words, a logo basically helps to clarify precisely what makes your store different.
By default, Magento 2 displays its own logo on the admin login page as well as in the backend menu.
However, it is possible to change the default Magento 2 admin logo in the admin login page & backend menu.
In this post, we will show you exactly how to change the default admin logo in your Magento 2 store.
Step-by-Step Process to Change Default Admin Logo in Magento 2
Unfortunately, Magento 2 does not provide any in-built option to change the default admin logo. However, a Magento 2 developer can certainly change the default admin logo manually.
Below, we’ve shared the method to change the default admin logo in both, admin login page as well as the backend menu.
Admin Login Page:
To change the admin logo in the admin login page, simply create an admin_login.xml file in the view/adminhtml/layout/ folder and copy the following code:
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="logo"> <arguments> <argument name="logo_image_src" xsi:type="string">https://assets.magedelight.com/media/logo/stores/1/logo.png</argument> </arguments> </referenceBlock> </body> </page>
Now, save the file and check the output:
Backend Menu:
To change the default logo in the Magento 2 backend menu, create a default.xml file in the view/adminhtml/layout/ folder and copy the following code:
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="header"> <block class="Magento\Backend\Block\Page\Header" name="logo" before="-"> <arguments> <argument name="show_part" xsi:type="string">logo</argument> <argument name="edition" translate="true" xsi:type="string">Community Edition</argument> <argument name="logo_image_src" xsi:type="string">https://assets.magedelight.com/media/logo/stores/1/logo.png</argument> </arguments> </block> </referenceContainer> </body> </page>
Now, save the file and check the output:
Conclusion
And that’s about it! Easy, right?
We hope that you found this tutorial helpful. If you have any questions, please ask them in the comments below.
And if you need our professional assistance, feel free to contact us anytime.