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.