Hi guys,
I have the logo’s explicit height and width issue:
https://dongknows.com
https://developers.google.com/speed/pagespeed/insights/?url=dongknows.com
Currently, I have this issue with (just) the logo image. The code Elvin mentioned here:
https://generatepress.com/forums/topic/how-to-set-height-and-width-for-the-logo-image/page/2/#post-1827778
fix the logo error but subequently caused the same error on ALL featured images of the Archive page. Here’s the code I used:
add_filter( 'generate_logo_output','tu_logo_atts', 10, 2 );
function tu_logo_atts( $output, $logo ) {
printf(
'<div class="site-logo">
<a href="%1$s" title="%2$s" rel="home">
<img width="341" height="132" src="%3$s" alt="%2$s" />
</a>
</div>',
esc_url( apply_filters( 'generate_logo_href' , home_url( '/' ) ) ),
esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
esc_url( apply_filters( 'generate_logo', $logo ) )
);
}
Please help!
Thanks,
-Dong.