Magento does not support loading svg through admin panel, so i am trying to change the website logo through code.

My logo is here:


I changed the file name here:


it now looks like this:

<block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
        <argument name="logo_img_width" xsi:type="number">147</argument>
        <argument name="logo_img_height" xsi:type="number">24</argument>
        <argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>

I deleted the cache using the command:

rm -rf public/var/cache

But this does not seem to help and my logo is not displaying.

Are there any other ways i can achieve this?

  • 2
    Please post a question or translate in English. Oct 12, 2018 at 11:12
  • I'm voting to close this question as off-topic because of language
    – Amit Bera
    Oct 12, 2018 at 11:46
  • @AmitBera we have successfully translated question Oct 12, 2018 at 12:01
  • 1
    ha ha , You used google. I have wait for user update
    – Amit Bera
    Oct 12, 2018 at 12:02
  • Yes @AmitBera used google translate :) Oct 12, 2018 at 12:05

1 Answer 1


it is recomended do not change the vendor files so. in default.xml file paste this code and create web/images/logo.png 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">
        <referenceBlock name="logo">
            <action method="setLogoFile">
                <argument name="logo_file" xsi:type="string">
        <referenceBlock name="logo" remove="true" />

clean the cache and reload the page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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