Site logo

Archived topic

Mobile Logo: Image Elements Do Not Have Explicit Width & Height

6 replies · Started by Sankalan on February 21, 2021

Viewing posts 1–7 of 7

Hi,

I am currently working on my staging site and checked it with Google PageSpeed Insights and found the warning:

Image Elements Do Not Have Explicit Width & Height.

I have two different logos - one for desktop and other for mobile.

This warning is showing up for mobile logo only. I did set the width for the logo in Site Identity settings, but that seems to work only for the desktop logo.

https://prnt.sc/102ulck

How to fix this issue?

Glad to hear you found the solution.
To note - its not actually required, as the logos height is defined by the Menu Item Height - so the absence of any w/h attributes won't affect its display.

It won't impact display, but it definitely caused CLS. The moment I added the code, CLS issue was gone.

thats because the image is being lazy loaded. We recommend you exclude logos from lazyloading by using the CSS Class: is-logo-image in the plugins exclusion field

Thank you David. I will implement it and get back to you on this.

You're welcome

This archived topic is closed to new replies.