Site logo

Archived topic

Setting Logo Height and Width Settings (and for Other Images in Posts)

7 replies · Started by Robin on March 23, 2021

Viewing posts 1–8 of 8

Hi

This is not the first time the question has been asked but answers seem to be fairly inconsistent and I'm not sure if I follow them anyway.

I'm looking to set the height and width img settings of my logo as well as the images on posts. This lack of settings seems to be a factor in page speed if GTMetrix is to go by.

I have seen solutions for adding a bunch of php code and some css, but it isn't clear where any of that is supposed to go and I don't want to break my site by doing it wrong.

Any help would be great. Site is at http://www.mancavery.com

Robin

Thanks Leo, that's done it but still waiting for PageSpeed Insights to start seeing the new settings before I can tell if its made much difference

The code should work right away.

Make sure to clear your caching plugin.

Cleared the cache and checked again on PSI, it recognises the height and width (230 and 44) for the desktop version, but it doesn't pick up the settings for the mobile version and reports the mobile version as having the missing attributes.

The huge irony is that the PSI page report is almost off the side of the screen.

I just noticed the mobile logo is running off a different class. The php snippet worked perfectly for the desktop logo, how can it be adapted for the mobile logo under a different class?

That's done it, thanks Leo

No problem :)

This archived topic is closed to new replies.