Archived topic
Giving Logo Explicit Dimensions
13 replies · Started by William on May 6, 2021
Hello,
Today I've uploaded a logo in the suggested dimensions (was previously just using text) and now I'm getting some CLS errors on pagespeed insights. It's telling me to 'Set an explicit width and height' and showing my logo. How do I go about doing this?
Edit: Looks like I'm also getting that same suggestion when it comes from images attached to 'related post'.
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
I'm getting the same notice on Google Page Speed test.
Sure thing Leo. I've attached a link in the private info section.
Hi there,
@William, there are 2 different sources of this issue on your site.
1 is the logo, I believe this was fixed on GP Premium 2.0. Can you try updating to the latest version?
The other is from the images on the related posts. The images have width attributes but lacked height attribute/s.
This isn't controlled by the theme as it seems to be added using a plugin. You should ask the plugin developer what's the best practice for this. (Perhaps, if they have any filters for it. )
@Clayton, can you try updating to the latest GPP version as well?
Hi Elvin,
I'm currently on GP Premium 2.0.2. Is that the latest version or am I missing one?
As for the related post. Is that not a function that's on the theme? I don't have a specific plugin installed as far as I'm concerned that's strictly for related posts.
I’m currently on GP Premium 2.0.2. Is that the latest version or am I missing one?
That's the latest one. It should've been fixed.
Can you try reuploading the logo? Remove it and add it again and see if it works.
As for the related post. Is that not a function that’s on the theme? I don’t have a specific plugin installed as far as I’m concerned that’s strictly for related posts.
Your site seems to be using JetPack related posts.
https://jetpack.com/support/related-posts/
I’m also running the latest version of GP. I’ll try removing and reading the logo.
Make sure cache is cleared on the server side as well.
Some hosts cache HTML structure so the pre-GPP 2.0 <img> logo element might've been preserved.
I've removed the logo and re-added in Customizer. I also regenerated the CSS in GeneratePress General settings. No luck. I don't have any caching on this website or server at the moment.
I've removed and uploaded/emptied cache and it stills shows the problem.
I wasn't aware the related post was JetPack - I'll see if they have a solution. Thanks!
I’ve removed and uploaded/emptied cache and it stills shows the problem.
I wasn’t aware the related post was JetPack – I’ll see if they have a solution. Thanks!
That's strange, can you try disabling ALL plugins except GP Premium to check if there's a plugin doing something to the images? Let us know.
Do you know if there's a fix without doing that? I need all of the plugins I have enabled.
In that case can you start a staging site so we can go through some debugging tips?
Thanks :)