How to Change Default Admin Logo in Magento 2

In the enhancing world of eCommerce, creating a strong, positive perception of a store is one of the most crucial aspects. A logo is one such aspect that directly affects the branding of the store and clarifies precisely what makes you different.

The admin panel of a default Magento 2 displays its logo in the admin login page and backend menu as shown below image:

  • Admin Login Page:
How to Change Default Admin Logo in Magento 2
  • Admin Backend Menu:
How to Change Default Admin Logo in Magento 2

Though Magento 2 does not provide any built-in feature to change the default admin logo, a developer have to do it manually.

Magento 2 store owner mostly prefers to change default admin logo in Magento 2 for branding purposes. Also you can upload SVG image in Magento 2 custom module to enhance visual content.

For example, your store sells CMS extensions, i.e., Magento 2. For that, it would be better if you manage to provide a personalized demo to your customer that allows them to explore the features of your extension.

In such a scenario, use the below method and change the default logo of Magento to your brand logo.

Moreover, you may also need to allow multiple admin login in Magento 2 to administer the store better and divide the workload for more efficiency.

Method to Change Default Admin Logo in Magento 2

  • For the Admin Login Page:

Create an admin_login.xml file at view/adminhtml/layout/

<?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">images/Meetanshi.png</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

The admin login page displays like:

How to Change Default Admin Logo in Magento 2
  • For the Default Logo in Backend Menu

Create a default.xml file in your custom module at view/adminhtml/layout/

<?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">images/Meetanshi.png</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

After applying the above code, the updated logo in the default backend menu will look as shown in image:

How to Change Default Admin Logo in Magento 2

Easy! Isn’t it?

Also, please share the solution with Magento Community via social media.

Thank you.

Kishor Chhugani

Article by

Kishor Chhugani

He is a Magento developer at Meetanshi with a jolly, extrovert, & friendly personality. He loves playing cricket and is a passionate foodie!