Upload larger logo image

Hello,

I am trying to use a logo image larger than the one allowed by the theme. If I change the size from css, there is more aliasing, so I need to be able to upload a bigger image (the theme forces to crop the image to a specific size, how can I avoid that or use a different cropping size)?

Thank you!

Best Regards,
Dimitris

Hello Dimitris,

Please try to use the following PHP code.

You can add PHP code to your site with Code Snippets plugin (just copy PHP code and paste it in Dashboard → Snippets → Add New after installing and activating the plugin, name the snippet, and click Save Changes and Activate button). Also you can add PHP code directly to functions.php file of your child theme.

add_action( 'after_setup_theme', 'child_custom_logo_setup', 11 );

function child_custom_logo_setup() {
    $args = array(
    	'height' => 160,
    	'width' => 400,
    );
    add_theme_support( 'custom-logo', $args );
}

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Thank you so much Roman!

It works.

You are welcome! :slight_smile:

Kind Regards, Roman.

Hey,

I am encountering the same issue.
However, my header image did not resize when adding the snippet.

Are different classes used somehow?
For reference: http://www.quantumcafe.be/en_US/

Thanks

Hello Acquilar,

Did you reupload logo image after applying the PHP snippet?

Kind Regards, Roman.

1 Like

Hi,

I see that the snippet actually changes the default resize option, but now I get the error when uploading: “Something went wrong, please try again later”.

Any ideas?

Edit: Seemed to be due to not having the latest updated, bug occured in the media lib.
Updated and works fine.
Thanks so much Roman!

You are welcome Acquilar! :slight_smile:

Kind Regards, Roman.

Hi…
I have done as suggested. Installed the snippet plugin, copy, paste, activate…but logo is still too small.

Any suggestions?

Thanks.

Hello,

Did you reupload logo image after applying the PHP snippet?

Kind Regards, Roman.

1 Like

Thank you for replying @roman.

I am not sure what happened but I must have done it correct, as the logo all the sudden was bigger :slight_smile:

Great! You are welcome :slight_smile:

Kind Regards, Roman.