Archived topic
Site Logo Size with WebP
3 replies · Started by Dan on May 22, 2021
I just used the Imagify plugin to optimize images and serve WebP versions.
When I do this, GP no longer respects the image size that is specified for the site logo.
In the customizer, the logo is set to 180px. But as soon as it serves it as a WebP, it shows it at 400px.
If I disable WebP images on the site, it goes back to the correct size again.
Edit to add more info: This was brought up before, last year. The OP of this thread (https://generatepress.com/forums/topic/imagify-webp-converter-post-featured-image/) mentions the logo sizing issue in his first post, but the topic is subsequently forgotten among other issues and no answer is given.
Hi there,
the webP plugin replaces the default <img> element with a <picture> element - which puts the necessary CSS class on the wrong element. You will need some CSS to correct that:
.site-header .header-image img {
width: 180px;
}
Bingo. Thank you!
You're welcome