You should be able to make it work by applying a background image to the css element parent to the logo.
I've just used the basic XF style here and just applied the logo as a background image to the <picture> tag the logo's <img> tag sits within.
background-image: url("your logo background url");
background-position: center;
background-size: whatever size works in your example;
If you're using a custom style from a theme however, things may be formatted different but Inspect Element will always be helpful in finding what you need to change.