How to Change Default Admin Logo in Magento 2

Method to Change Default Admin Logo in Magento 2

For the Admin Login Page

Create the admin_login.xml to change the Admin logo.

Directory

view/adminhtml/layout/admin_login.xml

Content of admin_login.xml

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

For the Default Logo in Backend Menu

Create the default.xml file to change the logo in the backend menu.

Directory

view/adminhtml/layout/default.xml

Content of default.xml

<?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/TOHlogo.png</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
If you are looking for Magento Developers, visit Magento Developer Agency.
Related Products