Users reported that image resizing in Discourse wasn’t working as expected — large or tall images were being displayed at full width with clipped heights, despite markdown specifying dimensions like ![image|210x500,200x]. southpaw provided examples showing the issue, noting that previews during editing displayed correctly but final posts did not. sam acknowledged the confusion and pointed to a proposed fix involving the min ratio to crop setting, which previously ignored markdown dimensions when cropping tall/narrow images. awesomerobot clarified that the cropping behavior was intentional to prevent extreme aspect ratios (e.g., 3x50000) from breaking layouts, but admitted the setting was opaque to users. codinghorror and Stephen illustrated how uncontrolled tall images break both topic streams and lightboxes. The issue was resolved by nbianca, who merged a PR (#9224) two months prior, ensuring markdown dimensions now override cropping logic. southpaw confirmed the fix works, allowing full-length smartphone screenshots to display properly in posts.
Does this mean there’s something I’m not understanding and doing wrong? And I don’t mean that to sound defensive, at all, simply that if it’s just that it’s confusing and I’ve not understood it, I’d love to know what I need to correct.
Large images are cropped based on the aspect ratio of the image as uploaded (there’s a setting called min ratio to crop that controls when they’re cropped)… this cropping applies even if the markdown dimensions fall below the cropping threshold.
So you’re not doing anything wrong other than being unaware of how the min ratio to crop threshold works (it would be a little crazy to expect everyone to understand that by simply looking at the image they’re about to upload, and the ratio setting is opaque to normal users!).
The fix being applied would ensure that the markdown dimensions are taken into consideration before cropping.
Not doing anything wrong. Just imagine a user uploaded an image that was 3 pixels wide and 50000 pixels tall. What would the topic look like, if that image was displayed in proportion? What if the user posted that image over and over?