0

I'm getting 404 for my logo in my default.xml

Existing code:

<referenceBlock name="logo">
        <arguments>
            <argument name="logo_src" xsi:type="string">\images\logo-small-730.png</argument>
            <argument name="logo_alt" xsi:type="string">Book of Us</argument>
        </arguments>
    </referenceBlock>

What is the correct path to use in layout XML files?? in /app/design/frontend/themename/deafult/web/images

0

Assuming your store uses the theme you mention in your path, the below should work. I have tried the solution below on my Magento 2 local (M2 2.3.3)

<referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/logo-small-730.png</argument>
                <argument name="logo_alt" xsi:type="string">Book of Us</argument>
                <argument name="logo_img_width" xsi:type="number">150</argument>
                <argument name="logo_img_height" xsi:type="number">200</argument>
            </arguments>
        </referenceBlock>

Also, if you need to understand why, you can take a look at the function \Magento\Theme\Block\Html\Header\Logo::_getLogoUrl

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.