News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Problem posting images

Started by Sir Osis of Liver, January 04, 2018, 05:52:12 PM

Previous topic - Next topic

Sir Osis of Liver

Having an odd problem posting images from external links on my 2.0.15 production form, same on test install.  Image is 484x552px jpg, it's displayed initially as 600x982, reverts to 484x552 when clicked on, back to 600x982 when clicked again.  A second image in same post is 397x650, displays as 484x552 initially, 397x650 when clicked.  Same thing happens if both images are in same post, or just one.  Two other jpgs in same batch display normally.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Are the images something you could link here? I'm curious to know how they differ from others, as that would seem like SMF incorrectly interpreted their size when posting, and resized them to be smaller - but in fact made them bigger instead.

( I'm guessing your set limits for image sizes are 600 x 650 in
  Admin -> Configuration -> Features and options -> Layout -> Max width/height of posted pictures )
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

I edited four images from same batch, you can see them here.  First and last are distorted til you click on them, second and third display normally.  Max width and height are both set to 0.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

#3
Ok, that is odd. I was going on instinct with that resizing issue, and it does look like I was partly right even though you don't have the limits set.
The source code reveals that they are indeed handled as BBC resized.


<div class="post">
<div class="inner" id="msg_145"><div align="center">
<img src="http://ring4a.jpg" alt="" width="484" height="552" class="bbc_img resized" /><br /><br />
<img src="http://ring2a.jpg" alt="" width="600" height="648" class="bbc_img resized" /><br /><br />
<img src="http://ring3.jpg" alt="" width="345" height="352" class="bbc_img resized" /><br /><br />
<img src="http://ring1.jpg" alt="" width="600" height="982" class="bbc_img resized" /><br /><br /><br /></div></div>


Did you use just IMG or is there attributes for size in the BBC?
A plain IMG embed should use class="bbc_img" if the image is left untouched and no sizelimits are met.

I also tested these exact same images on my own board, and without the size limits set they worked normally.
With 640x640 limits the first two (4 and 2) were resized, but seemed to work normally.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

BBC is adding size attributes.  Oddest thing is first image has been resized to natural size of fourth image.  I've posted first image in two subsequent posts, first one has same problem, second one was posted after clearing browser (IE11), it's displayed correctly.  All four images display correctly in gallery.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

What mods might you have that affect BBC or Image handling?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

The link is to a clean install.  It also happens on one of my production forums, which is different setup.  I've posted multiple images before abd never seen this.  Only difference is both installs are 2.0.15.  Can you duplicate the problem?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

That is why asked about mods, I was unable to replicate the issue on my own production forum.
I will test again on a clean install though, since I am curious about this.

Do you use the image proxy by the way?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

No, unless it was default enabled by upgrade.  Where's the setting?

n/m, proxy is disabled.  Going offline, will tinker with it tonight.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Ok, that's one thing where we differ - I'll test without it next.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Aleksi "Lex" Kilpinen

Tried with a fresh 2.1 without SSL, image proxy or size restrictions

Got this

<div class="inner" data-msgid="3" id="msg_3">
<img src="http://www..com/pics/ring4a.jpg" alt="" class="bbc_img"><br>
<img src="http://www..com/pics/ring2a.jpg" alt="" class="bbc_img"><br>
<img src="http://www..com/pics/ring3.jpg" alt="" class="bbc_img"><br>
<img src="http://www..com/pics/ring1.jpg" alt="" class="bbc_img"></div>
</div>


Tried with a very slightly modified 2.0.15 with SSL and image proxy, and no image size restrictions


<div class="inner" id="msg_122659">
<img src="https:///smf/proxy.php?request=http%3A%2F%2Fwww..com%2Fpics%2Fring4a.jpg&hash=84fb577b69199d18fd0c63d2204b675e" alt="" class="bbc_img" /><br />
<img src="https:///smf/proxy.php?request=http%3A%2F%2Fwww..com%2Fpics%2Fring2a.jpg&hash=09825f5a7844c0a604d5f834b2238733" alt="" class="bbc_img" /><br />
<img src="https:///smf/proxy.php?request=http%3A%2F%2Fwww..com%2Fpics%2Fring3.jpg&hash=967a5b4d6ffd5b3da2a5a6185ee29b72" alt="" class="bbc_img" /><br />
<img src="https:///smf/proxy.php?request=http%3A%2F%2Fwww..com%2Fpics%2Fring1.jpg&hash=bcd0dfcf236fbfb4c0dea58e29658025" alt="" class="bbc_img" />
</div>


I can't seem to replicate the issue on my server. Something in your SMF install is making all the images appear resized though.
Normally IMG tags don't put out a clickable image, and don't use the  bbc_img resized class - your's does for all of them:


<div class="inner" id="msg_145">
<div align="center">
<img src="http://www..com/pics/ring4a.jpg" alt="" width="484" height="552" class="bbc_img resized" /><br /><br />
<img src="http://www..com/pics/ring2a.jpg" alt="" width="600" height="648" class="bbc_img resized" /><br /><br />
<img src="http://www..com/pics/ring3.jpg" alt="" width="345" height="352" class="bbc_img resized" /><br /><br />
<img src="http://www..com/pics/ring1.jpg" alt="" width="600" height="982" class="bbc_img resized" /><br /><br /><br />
</div></div>
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

#11
If you look at the last two posts, same image, first was resized incorrectly, second was posted after clearing IE11, was not resized and displays correctly.  Something different in 2.0.15 seems to be confusing bbc and/or browser.  Will try this in FF, see what happens.  This is a clean install, reloaded it fairly recently, but I'll do that again.


Bizzarely, I can't reproduce the problem either. :o  No resize on fresh 2.0.15 install, or on production forum where I originally saw the problem.  Same pics, same code, works fine now in IE11.  Only thing I can figure is all my attempts to post these images originally on both installs were in same browser session, but don't have a clue what could cause this.

 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Quote from: Sir Osis of Liver on January 07, 2018, 03:32:49 PM
Bizzarely, I can't reproduce the problem either. :o  No resize on fresh 2.0.15 install, or on production forum where I originally saw the problem.  Same pics, same code, works fine now in IE11.  Only thing I can figure is all my attempts to post these images originally on both installs were in same browser session, but don't have a clue what could cause this.

Only getting weirder then. :o

Ok, let's try to narrow down things - What browser were you on when you made the original post?
Did you use Quick reply or the full Post template?
Are you using Wysiwyg editor or not?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Always use IE11, wysiwyg disabled, usually post with quick reply, but I was in/out editing the post.  I believe the initial post was borked, and when I moved over to test install got same result, and was able to duplicate it in subsequent posts.  Clearing the browser seemed to fix it, and when I went back to production forum and reposted, everything's normal.  The thing that makes no sense is that the first image was resized to the natural dimensions of the fourth image, you can see that in the test post.  Don't see how it could be browser related, resizing is done by code, not browser.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

I will try and experiment with different setups, if I come up with anything I'll let you know. But at the moment I must say this sounds like a very odd issue that I haven't seen before.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Is the resizing done by javascript?  That could possibly make it a browser issue.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Right now I don't think it is the actual resizing that is the problem. It is the image handling and BBC parsing, since the width and height attributes are added to the BBC.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: