Magento 2 logo: Methods to change it for your Magento store and email

Magento 2 logo is one of the best ways for customers to identify your brand easily and at same time, your Magento website becomes more reliable to the users. Therefore, right after installing Magento 2 successfully, the very first task to do is changing the Magento 2 Default Logo by your own one. Today, we will guide you to change logo for your Magento store and email

Magento 2 allows you to upload your logo image in 3 different file formats:

  • JPG/JPEG: This type of image comes with the highest compression rate. Also, it enables you to save your bandwidth when loading images and boost the speed of your Magento site
  • GIF: This image format gets higher quality than JPG, however, it comes with fewer colors than JPG.
  • PNG: this file type offers transparency, which is best suitable for logos with transparent background. However,  the file size is a little higher than JPG/JPEG.

We would suggest you to stick with PNG or JPG/JPEG, and utilize an image compression tool to resize your image size without affecting its quality. To make sure that your logo is shown perfectly on high-resolution devices, you should upload an image that its size is three times as large as the required size in the header. In case you don’t know the dimension of the logo, or of any picture used in your theme, just right-click on the image on your website, and check the element to get its dimension.

Magento 2 logo: Methods to change it for your Magento store and email

How to change the logo in Magento 2

Method 1: Change Magento 2 logo via backend

  • For Magento 2.0.x: Move to Stores > Configuration > General > Store View > Header
  • For Magento 2.1.x and 2.2.x: Go to Content > Configuration > Select Your Current Theme > Header

Step 1: Configure the following settings:

  • Logo Image: You click the ‘Upload’ button to upload a new logo.
  • Logo Image Width/ Logo Image Height: You enter the image width and height for the logo
  • Welcome Text: Input a custom welcome text for your landing page in the website
  • Logo Image Alt: Input the image alt text here.
  • Save Config: Save your settings

If you encounter particular issues while changing the logo in Magento 2.

Step 2: Check the following steps

  • Double check if you have saved your configurations.
  • Flush and refresh the Cache

Method 2: Change Magento 2 logo programmatically

With this way, you can change Magento 2 logo with all file types: SVG, JPG & PNG.

Open file manager and move to

\app\design\frontend\Magento\luma\Magento_Theme\layout\default.xml

Next step, run the following code to this file

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <action method="setLogoFile">
                <argument name="logo_file" xsi:type="string">
                    images/yournewlogo.png
                </argument>
            </action>
        </referenceBlock>
        <referenceBlock name="logo" remove="true" />
    </body>
</page>

Replace: images/yournewlogo.png with your file path and file name as you want

For instant, you want to set magesolution.svg as new logo file , you use this code line

  <argument name="logo_file" xsi:type="string"> images/magesolution.svg </argument>

At last, you flush cache and save change to apply new logo

Method 3: Change Magento 2 using file manager

This method supports SVG image file.  With this method, you can only change the default logo to a new SVG logo because we will replace the default svg image file of Magento.

The strengths of this method is that it permits you to use SVG image as your logo, which is not allowed in method 1.

Step 1: Find logo file path

You right click on logo and use browser’s inspect tool to find out  path to logo file.

For instance, in Magento 2.4, the default theme’s logo path is

/frontend/Magento/luma/pl_PL/images/logo.svg

Step 2: Upload new logo

After that, you open file manager of your hosting and upload a new file with the same name logo.svg to change the old logo file

At last, flush cache and refresh site to see changes

How to change email logo on Magento 2

Follow the following steps will help you know what you can do to replace Email Logo in Magento 2:

With Magento 2.0

  • On the Admin sidebar, Stores > Settings > Configuration.

With Magento 2.1 or above

  • On the Admin sidebar, Content > Design > Configuration > Select your current theme > .
  • Here, you will see the existing design configuration on the management table, then click on Edit under Action.
  • On the workplace, you scroll down to Other Settings, open Transactional Email setion,
    • To replace your Logo Email, click on Upload to choose one of the image files you want to use for your logo.
    • After that, you enter the alternate text identify the Logo Image Alt.
    • Require Logo Width and Logo Height in pixels. Just enter the number that doesn’t include “px” symbol. The appearance of the email logo in the header bases on the provided value size instead of the real size of the logo.

If you want to modify Header and Footer templates or if you run multiple website, you can assign a specific template to each, that will display on the transactional email message.

  • Select the Header Template and Footer Template from the available list as needed.

That’s all about Magento 2 logo and the effective ways to change it for your Magento store and email. If you still find it hard to change it in Magento 2 or any further questions regarding Magento, then you can get in touch with Magento experts for any free support.

Besides, if you are looking out for a cost effective Magento package for your eCommerce store, then look nowhere other than Magesolution. We not only offer an affordable Magento Development Package for all size and budget but also ensure that it helps your online business grow and sustain. Contact us for a free consultation!