How to disable logo cropping

How to disable logo cropping

You can add a logo from customizer settings Layout > Header > Site Identity. By default, Astra resizes the logo and physically crops it in the appropriate aspect ratio.

But sometimes you might have a logo image of perfect size and need to display it without cropping. In this case, you can use the following filter to disable default cropping by Astra. This filter will disable cropping by Astra. The exact logo image will be uploaded as the logo. If you need to resize it, you will need a custom CSS.

add_filter( 'astra_resize_logo', '__return_false' );

Add the above filter into the child theme’s functions.php file. If you are not sure, how to do this, here is an article that will guide you through.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page

Take the First Step Toward Success Now.

You’re backed by an amazing team and a risk-free money-back guarantee!

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

This field is required.

REWIND

YEAR IN REVIEW

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form