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">
<body>
<referenceBlock name="logo">
<arguments>
<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>
</arguments>
</referenceBlock>
</body>
</page>
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/
Best Answer
We need to declare in
app/design/frontend/Prasan/Sanku/Magento_Theme/layout/default.xml