1

First of all, I'm fairly new to Magento. And my question is how do I change the default header size for an image? The site I'm working on is upgrading from Magento version 2.3.2 to 2.3.3. And in version 2.3.2, the size of the image we used was not specified for the header. There the image was fine and at its normal size. So, when I tried using the same image in Magento version 2.3.3, the image is "squished"/compacted because the default header size seems to be half the size in the new Magento version.

Thanks in advance for your help.

| improve this question | | | | |
0

By header size image I am assuming you want to customise the logo, so for that you need to extend magentoroot_dir/vendor/magento/theme-frontend-luma/Magento_Theme/layout/default.xml so for doing its recommended to create a new theme and then copy your default.xml file at below path:

magentoroot_dir/app/design/frontend/Vendorname/Themename/Magento_Theme/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_img_width" xsi:type="number">50</argument> 
                <argument name="logo_img_height" xsi:type="number">150</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Hope this helps you.

| improve this answer | | | | |
  • Thanks for the advice I will try your suggestion. – Alvaro Nov 5 '19 at 16:41
  • I tried you suggestion, unfortunately it did not work for me. But, I did discover I could manually change the size of the logo via the Magento Admin panel. Thanks again for the help though. – Alvaro Nov 5 '19 at 23:45

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.