Image elements do not have explicit width and height for Logo on Website

Hi, I did a website a couple of years ago and we’re now doing SEO for it. I’ve ran a page speed test on it and the following issue has been raised:

Image elements do not have explicit width and height

This is regarding the logo. I have no idea how to solve this, as I can’t find anywhere to enter the width and height!

Hope you can help!


Hey @core365,

Thanks for writing in! Regretfully we do not have an option to add width and height for the Logo image. You can only set a maximum width. Explicitly setting the width and height will need to be done manually. Please check out this old thread on how you can edit the Logo image source code:

Be advised that custom coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Best Regards.

Hi @ruenel,

Thanks, I’ve read through the thread. Can I confirm if it’s a matter of entering the size within this line :

$site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">';

Also, do I need to replace $logo and $site_description with anything or just leave it as is?


Hi @core365,

You don’t need to change or replace anything else except adding the size attribute with the value. Please remember that we don’t offer any support for modified code or custom code issues.


Hi @tristup,

Ok, thanks!

I haven’t done anything like this before, so before I add anything to the code I’d really appreciate it if you can confirm if this is correct please:

$site_logo = '<img src="' . $logo . '" alt="' . $site_description . '" width="395" height="316">';


Hi @core365,

The code is correct.

Hi @tristup,

Many thanks for confirming that!

Thanks for all your time and help with this, it’s much appreciated!

Could you please put in a feature request for width and height controls?

Hi @core365,

You are most welcome.

Hi @JvP,

I will surely check and if possible will add this as a feature request.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.