Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Image not found
Avatar
LucasOrso
Member
Free Members
sp_UserOfflineSmall Offline
Jan 20, 2012 - 5:38 am

Good day! there is a problem:

The picture in the post are displayed, as [image not found], and when I add it perfectly displayed in the activity stream buddypress' and, but for our shows as [image not found]. I use bbcode editor. Using tynimce and there to set images have a smaller size - display it (though not as a thumbnail). I noticed that if you disable images miniaturization, it is displayed in the message forum. I noticed that this happens not with all the pictures, but with some. (pictures and these are normally displayed, and the addition of such a forum bbpress).

 Image Enlarger

I hope I will understand

-----

[Image Can Not Be Found] 

Avatar
LucasOrso
Member
Free Members
sp_UserOfflineSmall Offline
Jan 20, 2012 - 5:49 am

I'll try to insert a picture here that I do not see:

[Image Can Not Be Found]

 And one more picture:

[Image Can Not Be Found]

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 20, 2012 - 9:05 am

Are you seeing this on images from other sources? I.e., not vdraken.clan.su ?

andy-signature.png
YELLOW
SWORDFISH
Avatar
LucasOrso
Member
Free Members
sp_UserOfflineSmall Offline
Jan 20, 2012 - 11:06 am

Yes, they are shown in bbpress here you can see it. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 20, 2012 - 11:17 am

Not what I mean and not really relevant

I was meaning if you insert an image into an SP post from a different source domain do you see that problem.

andy-signature.png
YELLOW
SWORDFISH
Avatar
LucasOrso
Member
Free Members
sp_UserOfflineSmall Offline
Jan 20, 2012 - 12:27 pm

In general, all the pictures are displayed normally, but nevertheless there are some pictures from other resources that just do not appear.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 21, 2012 - 6:05 am

There may be a code problem in some of the V5 changes to this but I will need to do some tests before I can be sure so that is a task for later today.

But I can explain why you are seeing what you are seeing (even if it ends up that the code is wrong)!

If you are using the popup image enlargement feature to display images, then SP needs to know the width of the image. A normal and correctly formed html image tag will include the width. If, however, the user making the post has not included the image width then we need to interrogate the image file to determine the width. So a call is made to the source image url using the php function getimagesize().

If this call fails then you end up with the message you have seen. Which probably means the server in question was unwilling to provide the data and blocked the access. This is pretty unusual which is why I asked about images from other sources.

Looking at the code however does suggest that we may be making that attempt whether the image popup function is being used or not which is most likely incorrect as if it is not being used and while knowing the image width is useful, it is not an imperative. The one good reason for doing this whether the option is being used or not is, of course, in case a user decides to turn it on at a later date as it will ensure that all images DO have the width recorded in the post data.

I suppose one good way around that problem is to continue to seek the width as we do now but not to fail it if (a) the server rejects the attempt AND (b) the popup feature is turned off.

So I will take a longer look at the code today and run some tests and make those changes if necessary and possible.

andy-signature.png
YELLOW
SWORDFISH
Avatar
LucasOrso
Member
Free Members
sp_UserOfflineSmall Offline
Jan 25, 2012 - 5:03 am

Thank you for the very detailed explanation of the problem, so I will use option (b) turn off popup feature.
Is there any possibility to get the size of an image, for example, temporarily downloading it and delete after getting a size ? Are there any other ways to do this?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 25, 2012 - 6:45 am

Downloading would be somewhat expensive.
I see you were using the bbCode editor. If you used the tinyMCE rich text editor and used the image insert dialog (and for uploads our uploader SP Plugin) then this would try and collect that data.
Or, of course, add the image width into the tag itself.

The code for V5 was updated with that change by the way.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620