Site logo

Archived topic

Missing attributes Width + Height on site logo in SVG after update to 2.0.1

4 replies · Started by milan on May 3, 2021

Viewing posts 1–5 of 5

Hello,
after update to GP Premium 2.0.1 (working in Floats) still missing attributes Width + Height on site logo created in SVG format, in this website.
In mobile it is ok, but on desktop it is still showing this error in PageSpeed Insights.
I try this CSS :

.site-logo {
width: 658px;
height: 150px;
}

But it does not help. Could you please help me, what to do, thank you.

Ok, now it is not possible for me to switch to Flexbox. I tried it, but it broked my layout (different css styles in Floats and Flexbox).

No worries! Feel free to open a new topic if you'd like us to see what's broken :)

I also faced the issue of my SVG logo having no width and height in headers, creating issues with google pagespeed.

For desktop, I could fix it using Tom's link, but the mobile navigation header still would use empty width and height.

It turns out that my SVG files did upload with empty height and width into the media library, maybe because they were not specified correctly in the SVG source.

This filter from stackoverflow solved all my issues.

https://wordpress.stackexchange.com/a/256701

This archived topic is closed to new replies.