WordPress (WP) Custom Designed Login Logo gets truncated or cropped after WordPress is updated to 3.8+

It seems custom designed logo of login form gets cropped or truncated if you updated your WordPress installation to 3.8 or later.

 
Just for background & history of WordPress login form Logo was something like rectangular in shape as shown below:

 
Orginal WordPress Login Logo

 
My custom design of my Studio’s logo was right fit & was working fine as shown below:

 
WordPress Custom Login Logo Fix - Correct Custom Logo after code update

 
But when WordPress updated their codebase to version 3.8 it had look of round or circular jewel, As shown below:

 
WordPress Custom Login Logo Fix - Round 3.8

 
& that created panic in WordPress community as all custom logos got cropped or truncated by circular mask which was something looking like this:

 
WordPress Custom Login Logo Fix - Error Truncated & Cropped Custom Logo after 3.8 Update

 
But I later found the fix for this by just updating custom login logo code in functions.php to this:

 

function mas_custom_login_logo() {
    echo '<style type="text/css">
       #login h1 a { background-image:url('.get_bloginfo('stylesheet_directory').'/images/wp-mas-logo.png) !important; background-size: 300px 75px !important; height: 75px !important; width: 300px !important; }
    </style>';
}

add_action('login_head', 'mas_custom_login_logo');

 
Note: change width & height desired numbers & also change path of image url & image name.

 
Again after the update everything was working fine with expected & correct result

 
WordPress Custom Login Logo Fix - Correct Custom Logo after code update

 
Hope above code will help you to get same result you expect & we intended.

 
Thanks & Regards
Mandar Apte

Mandar Apte

This website contains a design articles blog by Mandar Apte. He writes and shares his iOS development, graphic, web, & animation film design experience through articles. Mandar is Mumbai based multi-disciplinary designer with expertise in UI, UX, Logo, Symbol, and Brand Identity design. He is an alumnus of Sir J. J. Institute of Applied Art, Mumbai. He currently runs his studio in the heart of the city of Mumbai.

Leave a Reply

Your email address will not be published. Required fields are marked *