XF 2.2 Attachment thumbnails now square random crop... changeable?

Overscan

Active member
So, mostly I like the updated attachment handling, but I'm not a fan of the cropped square thumbnails. It it possible to keep the original picture aspect ratio in the thumbnail? Or at least have a larger crop? My large image attachments are given some random small square of the picture as a thumbnail!

Attachment handling is core to my forum's functionality. This is potentially a showstopper for upgrading.
 
Last edited:
Solution
The issue is easily fixed by adding the following code to your extra.less template.

Code:
.file-preview img, .file-preview video {
    object-fit: contain;
}
There aren't any options for this. Note that it only applies to non-embedded thumbnails -- if you embed the image, the full image/thumbnail is shown.
 
There aren't any options for this. Note that it only applies to non-embedded thumbnails -- if you embed the image, the full image/thumbnail is sh
The issue is easily fixed by adding the following code to your extra.less template.

Code:
.file-preview img, .file-preview video {
    object-fit: contain;
}
Thanks Andy - that's a valid workaround.

I prefer the images as thumbnails after the message rather than in the body. It makes sense in the context of my forum. I appreciate this may not be a big use case.
 
Back
Top Bottom