Home Forums WoodMart support forum Header Builder: Logo ‘Add width and height attributes’ option has no effect

Header Builder: Logo ‘Add width and height attributes’ option has no effect

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #711030

    Mira
    Participant

    Hi Woodmart Support,

    I’m experiencing an issue with the “Add width and height attributes” option in the Header Builder logo settings.

    Theme: Woodmart 8.x (latest)
    WordPress: 6.9.1

    Steps to reproduce:
    1. Go to Header Builder → Desktop → Logo element → Settings
    2. Logo width is set to 135 PX
    3. Enable “Add width and height attributes” → ON
    4. Click Save → Save Header
    5. Repeat for Mobile header (logo width 100 PX)
    6. Check the frontend HTML output

    Expected result:
    <img src=".../logo.png" alt="..." style="max-width: 135px;" width="135" height="131" />
    Actual result:
    <img src=".../logo.png" alt="..." style="max-width: 135px;" loading="lazy" />

    The width and height attributes are not added to the img tag, even though the option is enabled for both Desktop and Mobile logos. The original image is 369×359 px.

    This causes a PageSpeed Insights warning: “Image elements do not have explicit width and height” which affects CLS score.

    How can I fix this? Is there a workaround or a known solution?

    Thank you!

    • This topic was modified 4 months ago by Mira.
    #711198

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    May be there is an issue with the 3rd party plugins. Please deactivate all the 3rd party plugins and activate only theme-required plugins on the site and then check the issue. I am sure your issue will be solved. Then Activate the 3rd party plugins one by one and check which plugin is creating the issue for you.

    Otherwise, if the issue still exists then keep the 3rd party plugins deactivated and share the WP admin login details of your site so I will check and give you a possible solution.

    Best Regards.

Viewing 2 posts - 1 through 2 (of 2 total)