Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: w.p. on February 17, 2022, 03:36:26 AM

Title: Image aspect ratio is distorted
Post by: w.p. on February 17, 2022, 03:36:26 AM
There is aspect distortion when viewing the picture page on your phone. Everything is narrow and tall. You can see the same effect when the browser window is narrowed.
Here is my example: forum_roztocze_org_pl/index.php/topic,15923.0.html (change the underlines to dots)
To see what I mean, slowly narrow your browser window.
Title: Re: Image aspect ratio is distorted
Post by: Antechinus on February 17, 2022, 04:10:01 AM
Ok. Looks like they forgot to add CSS image scaling for attachments to 2.1. That quite an oversight.
Title: Re: Image aspect ratio is distorted
Post by: Aleksi "Lex" Kilpinen on February 17, 2022, 11:15:18 AM
That looks to me like it's a thumbnail image, I don't think anyone thought of 700x700 thumbs.

See, this doesn't act like that.

kwadrat.jpg
Title: Re: Image aspect ratio is distorted
Post by: w.p. on February 17, 2022, 01:07:17 PM
The example above does not show the error anymore, because I fixed it temporarily (by editing the Themes / default /Display.template.php file)

Here is the forum you just installed. I wrote one thread and there is one picture in it. A little bigger than before :-) Open the browser in a window and narrow the window.

testsmf_roztocze_org_pl/index.php?topic=2.0
Title: Re: Image aspect ratio is distorted
Post by: Aleksi "Lex" Kilpinen on February 17, 2022, 01:18:19 PM
It is still a thumbnail image. Albeit, a 1000x1000 px thumbnail.
It wasn't exactly designed to work that way.

kwadrat.jpg

You can embed the image in your post, and disable showing thumbnails for embedded images and it will work like you expect it to.
Title: Re: Image aspect ratio is distorted
Post by: Kindred on February 17, 2022, 01:20:04 PM
Look at what Lex did with an attachment here.

You broke the design by allowing a 700x700 or a 900x900 pixel "thumbnail" for the attachment -- instead of (as the default setting) having a tiny thumbnail, with the attachment in the BODY of the message
Title: Re: Image aspect ratio is distorted
Post by: w.p. on February 17, 2022, 02:50:14 PM
We have been using the SMF forum since 2003 from version 1.0.x
And it looks like we haven't learned how to operate it yet.
For 19 years, dozens of users have been sending pictures in the same way as I showed in the examples. And it turns out that they are doing it wrong :-) Everyone and always :-)
If the SMF forum works well and only a few dozen users don't know how to use it, wouldn't it be a good idea to move this thread to another section? Where will someone tell you how to do it right?
You can take a look at how the test forum is set up, where I showed tapered photos. The login is "admin" and the password is "12.three.45". This is just a test, no one will break anything here.

Wojtek Pysz
Poland, Jarosław on the San
Title: Re: Image aspect ratio is distorted
Post by: Antechinus on February 17, 2022, 03:03:37 PM
I would not say the OP "broke the design". I would say there was a simple and quite fundamental oversight here.

1/ The admin centre allows people to set thumbnail sizes of whatever they choose.
2/ It also allows the option of not thumbnailing at all, and attaching images without resizing.
3/ Images in posts have scaling for viewport width handled, with correct aspect ratio, via CSS.
4/ It would be logical, indeed obvious, to ensure that attached images were handled the same way.

Obvious case: someone decides to set thumbs at 480px and you're viewing the post on a phone like mine (Motorola 5G Plus, 414 wide). You may say that's a big thumb, but it's allowed. If you're going to allow it, makes sense it should scale like any other image in posts.

It would be simple to fix. IMO, it makes sense to fix it.
Title: Re: Image aspect ratio is distorted
Post by: Sesquipedalian on February 18, 2022, 02:03:05 AM
This is a legitimate bug. Tracked in #7338 (https://github.com/SimpleMachines/SMF2.1/issues/7338).
Title: Re: Image aspect ratio is distorted
Post by: w.p. on February 19, 2022, 02:35:06 AM
Quote from: Sesquipedalian on February 18, 2022, 02:03:05 AMThis is a legitimate bug. Tracked in #7338 (https://github.com/SimpleMachines/SMF2.1/issues/7338).
As the topic has been resolved and submitted for implementation on Github, I am removing the example SMF installations that I referred to above.
As a souvenir I leave the screenshot from the smartphone:
ciekawe_tematy_net/2022/img/smf-smartfon.jpg (change the underlines to dots)