How To

How to change default Magento 2 Logo in Admin Panel

Hello Magento Friends ?,

Welcome to the Technical Blog chain by MageComp. Today’s point of discussion is How to change default Magento 2 Logo in Admin Panel. We have already discussed How to Change the Logo in Magento 2 Frontend. Look into our lastly published blog, Magento 2: How To Redirect 404 Page Found To Search Page

Now, let’s get started with our present talk ?

An essential section that requires polishing is the admin bar of Magento 2. By default, the admin panel shows the default Magento 2 logo on the login page and menubar. Although the admin can customize the login page and menubar according to the requirements and change the default Magento 2 logo The following steps will help you to change default Magento 2 Logo in Admin Panel.

How to change default Magento 2 Logo in Admin Panel:

Here we will be discussing to change the default Magento 2 logo in Admin Login Page and Admin Menubar.

Magento 2 Admin Login Page:

Step 1: Create a file in the following path: 

app\code\Vendor\Extension\view\adminhtml\layout\admin_login.xml

And add below 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">images/admin-login.png</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Step 2: Now, upload your file in the below path:

vendor\magento\theme-adminhtml-backend\web\images\admin-login.png

Result (Magento 2 Admin Login Page):

Take a look at the Magento 2 Admin Login Page, default Magento 2 logo changed with the one you applied.

Magento 2 Admin Menubar:

Step 1: Create a file in the following path: 

app\code\Vendor\Extension\view\adminhtml\layout\default.xml

And add below 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">images/magento-menu-logo.png</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

Step 2: Now, upload your file in the below path:

vendor\magento\theme-adminhtml-backend\web\images\magento-menu-logo.png

Result (Magento 2 Admin Menubar):

Take a look at the Magento 2 Admin Menubar, default Magento 2 logo changed with the one you applied.

Conclusion:

Expectantly the above solution is helpful to change default Magento 2 Logo in Admin Panel for all the Magento Admins out there. Stuck anywhere? Just comment down below and I will figure it out as soon as possible. Like it? Rate it, Share it!

See you next time, until then Stay Tuned! 

Happy Customizing ?

Click to rate this post!
[Total: 10 Average: 4.6]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate ?️ Certified Magento Developer?‍?. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.?

View Comments

Recent Posts

Generating Thumbnails with Spatie Media Library in Laravel 11: A Step-by-Step Guide

Generating image thumbnails is a common requirement in web applications, especially when handling media-heavy content.…

17 hours ago

Enhancing Web Application Security with Laravel’s Built-In Features

In today’s digital landscape, web application security is paramount. As a powerful PHP framework, Laravel…

2 days ago

Magento 2 Extensions Digest October 2024 (New Release & Updates)

October was an exciting month for MageComp! From significant updates across our Magento 2 extension…

2 days ago

Improving Error Handling and Transition Management in Remix with useRouteError and useViewTransitionState

In modern web development, seamless navigation and state management are crucial for delivering a smooth…

1 week ago

Magento Open Source 2.4.8-Beta Release Notes

Magento Open Source 2.4.8 beta version released on October  8, 2024. The latest release of…

2 weeks ago

How to Create Catalog Price Rule in Magento 2 Programmatically?

Hello Magento Friends, Creating catalog price rules programmatically in Magento 2 can be a valuable…

2 weeks ago