Very tall and narrow image appears zoomed in and cut off

AI-generated summary

A user, seanblue, reported an issue with very tall and narrow images appearing zoomed in and cut off in posts. awesomerobot explained that this is an intentional feature to prevent tall images from dominating discussions, and that the image can still be viewed in full by clicking on it. The feature is controlled by the min ratio to crop setting, which is set to 0.45 by default.

seanblue questioned whether the aspect ratio is the correct factor to consider, suggesting that the height of the image might be a more relevant concern. awesomerobot clarified that the aspect ratio is used to ensure that thumbnails are legible and not just a narrow sliver of the original image. This approach helps to detect tall and skinny images that might be unclear when resized, and crops them to ensure that at least part of the image is visible as a preview. seanblue found this explanation helpful.

I assume this is a bug, but can’t be sure. Sometimes when I post a really thin image, the aspect ratio gets completely messed up and the image gets cut off. Take the following image. On preview, it seems like it will show up correctly. But then on the post itself it shows up zoomed in and cut off. You have to click the image to get it to show up properly.

More information: It seems like this might be happening delayed a bit. This image showed up correctly for a few moments, and then updated to the cut off view. Perhaps one of the post processing functions causes this to happen.

This is intentional to prevent tall images from dominating the discussion (the full image is still available on click).

We consider it a safe default for most sites, but if your community wants to post tall images you can adjust it.

The setting that controls it is called min ratio to crop and the default is 0.45; the image you posted here is 1531x3962, so when width / height that’s 0.39 and it gets cropped. If you want similarly sized images to avoid being cropped, you could decrease the ratio a bit (maybe 0.35?) and see how it goes.

6 Likes

It’s not just that, a thumbnail such as

isn’t too hot either.

The source image was rotated to make a point, but it’s pretty cool!

5 Likes

Hmm, that’s interesting. If you’re worried about it taking up too much screen space isn’t it the height itself that’s the problem though, not the aspect ratio? Just not sure if I’m missing something here.

That’s not the only reason as pointed out above. Knowing when to crop thumbnails is useful so the thumbnails are actually legible and not just an indiscriminate sliver.

If I uploaded a 100x2000px image, and we capped the height at 500px and resized it the image to fit, you’d be looking at a 25x500px image — which would likely make the image content really tiny and unclear. Using the ratio assures we can detect tall and skinny images that would likely fall into that issue, and then we can crop and ensure that at least part of the image is legible as a preview.

6 Likes

Makes sense. Thanks for the explanation.

1 Like