Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: forumovod on July 23, 2021, 08:11:43 PM

Title: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 23, 2021, 08:11:43 PM
After upgrading from RC3 to RC4 - the problem is that the inserted images does not adapt to the screen size.
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: Diego Andrés on July 23, 2021, 10:06:51 PM
Could you link or attach and example?
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 24, 2021, 07:20:50 PM
Quote from: Diego Andrés on July 23, 2021, 10:06:51 PM
Could you link or attach and example?

Examples with screenshots.
An 800 x 533 image is inserted into the message.
When the screen is reduced, a scroll bar appears - the image does not adapt to the width of the screen.
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: Diego Andrés on July 24, 2021, 08:00:01 PM
I'm assuming it's when inserting an attachment?
I can't replicate this after inserting a few large images in the post
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 25, 2021, 10:36:23 PM
Quote from: Diego Andrés on July 24, 2021, 08:00:01 PM
I'm assuming it's when inserting an attachment?

yes

This problem appeared on all my forums immediately after upgrading from RC3 to RC4.
Used Large upgrade 2.1 RC4.
php 7.3
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 25, 2021, 10:47:13 PM
Quote from: Diego Andrés on July 24, 2021, 08:00:01 PM
I can't replicate this after inserting a few large images in the post

The same problem: https://www.simplemachines.org/community/index.php?topic=578184.0
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: Sesquipedalian on July 26, 2021, 02:44:25 AM
1. Can you show us the raw BBcode being used to insert the image?
2. What values do you have set for the "Max display width of posted or attached images" and "Max display height of posted or attached images" settings? (Administration Center ► Posts and Topics ► Post Settings)
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: skb on July 26, 2021, 05:45:12 AM
Let me try to explain the issue.

With RC3, even if the image was inserted within the post with say settings of 150 x 150. It would behave like a thumbnail, and show in original size when clicked.

In RC4 inserted images will display in the max width x max height being set and not show in the uploaded size when clicked.

If this change is intended, then we need to set larger size for max display width x height, and move on.
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 26, 2021, 06:31:11 PM
Quote from: Sesquipedalian on July 26, 2021, 02:44:25 AM
1. Can you show us the raw BBcode being used to insert the image?
2. What values do you have set for the "Max display width of posted or attached images" and "Max display height of posted or attached images" settings? (Administration Center ► Posts and Topics ► Post Settings)

<div class="post">
<div class="inner" data-msgid="281130" id="msg_281130">
test<br>Image 800 x 533<br><br>
<img src="https://site.ru/index.php?action=dlattach;topic=16674.0;attach=38516" alt="91bfd9ff918efee1598966972.jpg" title="91bfd9ff918efee1598966972.jpg" class="bbc_img">
</div>
</div><!-- .post -->
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 26, 2021, 07:36:23 PM
Why on simplemachines.org there is no test forum 2.1. RC4 ?
It would be much easier to show the identified problems on the test forum.
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: ozp on July 27, 2021, 02:23:33 AM
I think this commit will fix your problem. It was merged after RC4. https://github.com/SimpleMachines/SMF2.1/commit/996ce181d77e2e1ab00b579ba5cff0963bfa95e3
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: forumovod on July 27, 2021, 06:29:38 PM
Quote from: ozp on July 27, 2021, 02:23:33 AM
I think this commit will fix your problem. It was merged after RC4. https://github.com/SimpleMachines/SMF2.1/commit/996ce181d77e2e1ab00b579ba5cff0963bfa95e3

Thanks. The inserted images are now adapted to the screen size.
Title: Re: In RC4 inserted image does not adapt to the screen size
Post by: Antechinus on July 27, 2021, 07:45:05 PM
I wasn't previously aware of that min() fucntion in CSS. Very handy. :)
https://developer.mozilla.org/en-US/docs/Web/CSS/min()