Tiny category image

We have recently added logo images to some of our category and they originally looked great, taking up the full vertical space, but have now become small without us changing any settings. I appreciate any help on this!

1 Like

Yes, there’s been a recent change to these:

There’s nothing to it, but fiddling around with custom css to make it work again with your specific image.

Example with:

.category-heading__logo.category-logo.aspect-image {
  width: auto;
  height: 150px; 
}

Might need some tweaks for mobile vs desktop.

@marvi were you able to resolve your issue? If so, would appreciate a reply here to share what you did! If not and you still need more help you can let us know what you’ve tried and where you got stuck. Or as a hosted customer of ours you’re also welcome to write to team@discourse.org.

This change is also problematic if your images are non-square as they are now getting squashed into a square rectangle. Please fix this to preserve aspect ratio. The CSS class is even called “aspect-image” suggesting that aspect ratio is preserved. Thanks!

@chapoi shared some CSS for that in her post above. If the default is not changed, you can use that as a basis for customising your own site.

2 Likes

I have applied that CSS and it worked. However I think this should not be required. In my opinion, it was a mistake to change the behavior for a class called aspect-image to not preserve image aspect ratio. This change affected a number of users who now have to work around it with custom CSS. Please consider reverting this change in a future Discourse release. Thank you.