XF 2.2 can't add logo's height and width


I added logo's width and height (see attached img), but I keep getting the same error

"Use explicit width and height on image elements"

<img src="/styles/default/xenforo/xenforo-logo.png" alt="Todo Gatos | todo para tu gato">

Could anyone explain me what I am doing wrong?? any solution for this?




  • basic.webp
    25.1 KB · Views: 11
That isn't really an error, it's more advisory warning to avoid content layout shift.

However the settings you have should be doing the job of supplying the explicit width and height so I'd check you are editing the correct style, as it looks like the style you are editing is the default with xenforo logo, not your own logo.
Last edited:
What problems?

Don't rename your custom logo to match the default logo - it will be overwritten the next time you upgrade.

Name it something unique and update the path in the style settings.
will do. thanks
Even so the height and width you put in those settings ARE the explicit height and with and so should stop the nag your are getting from Lighthouse or whatever. XenForo's own code should add what you need to be responsive without CLS.

img {
    max-width: 100%;
Top Bottom