I ran into this on my website, Smooth Web Hosting. Even when I saved the logo at exactly the right size, WordPress made me crop it in Customise > Site Identity, and the cropped version looked blurry.
This snippet tells WordPress your logo can be any size, so it lets you skip the crop.
The code
Add this to your theme’s functions.php. I’d strongly recommend using a child theme, so a theme update doesn’t wipe it out.
// Let the site logo be any size, so WordPress offers "Skip Cropping".
function logo_size_change() {
remove_theme_support( 'custom-logo' );
add_theme_support( 'custom-logo', array(
'height' => 82, // your logo's height in pixels
'width' => 240, // your logo's width in pixels
'flex-height' => true,
'flex-width' => true,
) );
}
add_action( 'after_setup_theme', 'logo_size_change', 11 );Change the height and width to suit your logo.
How it works
With flex-height and flex-width turned on, WordPress shows a Skip Cropping button when you choose a logo. Click it, and your logo is used at its original quality.
This is for classic themes, which use the Customizer. If you use a block theme, the Site Logo block doesn’t force a crop, so you don’t need it.