Width and Height of Logo

Hi,

my Logo has a width of 570px and a height of 54px:

But when I check the source code of my site and inspect the logo, it has no width and height within the source code. This is a problem for lazy load, because the plugin hasn´t the correct hight of the logo, so the site “jumps”.

I checked my settings in Customizer > Header > Logo Image

The field “Dimension Preview” is greyed out. I can´t add anything here. And if I add the 570px to the field “Logo Width px” my Logo will be scaled to 285px x 27px (see screenshot). I do not understand this behaviour?

So how can I set the height and width of my logo that it appears in the source code?

Michael

Hi Michael,

Thank you for writing in, you can set logo width under Theme Options > Header > Logo Width. You need to double it though for retina display, so that is 570 x 2 = 1140, the logo height is auto since it needs to resize (responsive) proportionately.

Hope it helps,
Cheers!

Hi,

no, this does not solve the problem. Even when I add 1140 pixel there, the height and width of the image is not added to the source code:

<img src="//one-million-places.com/wp-content/uploads/2020/one-million-places.jpg" alt="One Million Places" class="perfmatters-lazy loaded" data-src="//one-million-places.com/wp-content/uploads/2020/one-million-places.jpg" loading="lazy" data-was-processed="true">

All other pictures, like the thumbnais from the recent posts have this information like

... https://one-million-places.com/wp-content/uploads/2020/deutschland/augsburg-titelbild-100x67.jpg 100w" data-was-processed="true" width="1200" height="800*>

So is there any other trick to add the width and height of the Logo to the source code?

Or do I have to add the Logo in my Child Theme in the Header section?

Hello Michael,
Thanks for writing to us
You can add the width and height of the Logo to the source code. For that, it would need some custom coding. You need to place this file in your child theme \x\framework\legacy\cranium\headers\views\global\_brand.php
After that, you can change the code there.
Thanks

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