Advertisement:

Author Topic: Problem posting images  (Read 748 times)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Problem posting images
« on: January 04, 2018, 05:52:12 PM »
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.

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #1 on: January 04, 2018, 06:02:55 PM »
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 )
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #2 on: January 04, 2018, 06:39:10 PM »
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.

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #3 on: January 05, 2018, 01:07:45 AM »
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.

Code: [Select]
<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.
« Last Edit: January 05, 2018, 01:43:21 AM by Aleksi "Lex" Kilpinen »
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #4 on: January 05, 2018, 11:55:39 AM »
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.

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #5 on: January 05, 2018, 12:01:57 PM »
What mods might you have that affect BBC or Image handling?
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #6 on: January 05, 2018, 12:05:11 PM »
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?

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #7 on: January 05, 2018, 12:09:24 PM »
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?
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #8 on: January 05, 2018, 12:21:21 PM »
No, unless it was default enabled by upgrade.  Where's the setting?

n/m, proxy is disabled.  Going offline, will tinker with it tonight.

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #9 on: January 05, 2018, 12:24:11 PM »
Ok, that's one thing where we differ - I'll test without it next.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #10 on: January 07, 2018, 07:50:36 AM »
Tried with a fresh 2.1 without SSL, image proxy or size restrictions

Got this
Code: [Select]
<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

Code: [Select]
<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:

Code: [Select]
<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>
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #11 on: January 07, 2018, 03:32:49 PM »
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.

 
« Last Edit: January 07, 2018, 04:01:08 PM by Sir Osis of Liver »

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #12 on: January 08, 2018, 05:23:48 AM »
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?
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #13 on: January 08, 2018, 11:58:41 AM »
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.

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #14 on: January 10, 2018, 01:22:23 AM »
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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,718
  • There's someone in my head but it's not me.
Re: Problem posting images
« Reply #15 on: January 10, 2018, 11:41:03 AM »
Is the resizing done by javascript?  That could possibly make it a browser issue.


Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,717
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Problem posting images
« Reply #16 on: January 11, 2018, 05:42:57 AM »
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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"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