Fixed Resizing pictures: setting height with width=auto does not work as expected

Julsfels

Member
Affected version
2.2.4
Hello,

we have a problem with setting the height for an attached image and leaving the width = auto.

In the editor, everthing works as expected - setting the width to 800 and height = auto resizes the image according to the width...

01.jpg

... and setting the height to 300 and width = auto resizes the image according to the height.


02.jpg

But in Preview and after posting, only the image with modified width shows up correctly, the one with modified height sets the new height but stretches the image to full original width instead of resizing the whole image.

I insert the example below:
the original picture (first one) has the size 1920 x 1080 Pixels.
The second picture has width = 800 and height = auto, the image is resized as expected.
The third picture has height = 300 and width = auto, and the picture gets stretched after posting and not resized.

48-05.jpg
48-05.jpg
48-05.jpg

When I edit the post, the difference between editor and preview/posted is still there.

Is this by design and intended to be correct, or is it a bug?

EDIT: one of our users told me that it worked before the Upgrade to 2.2.4, because she always resizes pictures this way.

Thanks in advance!
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.5).

Change log:
Allow embedded attachments with a height resize only to maintain the correct aspect ratio.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom