I had created custom theme in Magento 2 and parent theme as Magento/blank. In my custom theme I have changed logo for my theme. I had declared the theme logo in the app/design/frontend/Prasan/Sanku/layout/default.xml

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="logo">
                <argument name="logo_file" xsi:type="string">images/logo_new.png</argument>
                <argument name="logo_img_width" xsi:type="number">300</argument>
                <argument name="logo_img_height" xsi:type="number">300</argument>

After writing this code I had cleared following files var/cache , var/generation, var/view_preprocessed and even pub/static/ but still the theme logo not changed.

I had uploaded logo_new.png at app/design/frontend/Prasan/Sanku/web/images/


We need to declare in


  • thanks Bilal Usean. its a small think i missed. thanks again. Jul 15 '16 at 6:28
  • @PradeepSanku, you didn't miss anything. Magento's documentation is stated as your original question, but their documentation is wrong.
    – Brent
    May 4 '17 at 20:26
  • Is it the same for Magento 2.3 ? May 20 '20 at 11:16

Magento 2 uses an SVG logo by default, and it will find yours automatically if you put it in your theme directory at: web/images/logo.svg.

You may also need to specify the dimensions in: Magento_Theme/layout/default.xml.


    <referenceBlock name="logo">
            <!-- Set numbers as needed -->
            <argument name="logo_width" xsi:type="number">180</argument>
            <argument name="logo_height" xsi:type="number">75</argument>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.