How to Add the logo using different style in Magento 2

To Change Logo in Magento 2 Using Admin Panel:- 






And After Open the Edit section,You can see Header section like this.




  • To upload a new logo, click on Choose File. Then, choose the file from your computer.
  • Enter the Logo Image Width and Logo Image Height.
  • In the Logo Image Alt field, enter the text that you want to appear when someone hovers over the image.

OUTPUT :- 




To Change Logo in Magento 2 Using XMl file:- 



Step 1:- create new theme and go to your theme path app/design/frontend/vendor_name/theme_name/Magento_theme/layout/default.xml

Try to set a new argument in the xml for the logo block something like:
<referenceBlock name="logo">
    <arguments>
        <argument name="logo_img_width" xsi:type="number">147</argument>
        <argument name="logo_img_height" xsi:type="number">103</argument>
        <argument name="logo_src" xsi:type="string">your_logo.img</argument>
    </arguments>
</referenceBlock>
Step 2: change code after run,
php bin/magento c:c
php bin/magento c:f 

Thanks ...




Comments