Support Forum

"Picture not found"

HA Hari
Hari
Member

I have the hunch, that the following issue is not caused by SP, but by some other factor in my installation, but maybe you have an idea where I should look. Any help is appreciated.

In the forum, we use the Image-Tag to imbed Pics that reside on webspace. We use external Pics as well as those stored in my own WP media container. I never had any problem with this function, as long as the Weblinks to the Pics were OK by itself (tested in a browser directly)

From one day to another, I now get a “picture not found” Message when embedding an image-link in a post via image-tags of the editor (BB Code).

But *only*, when the photo resides in my own WP Media Container. Links to external sources still work well. And I checked the Links multiple times with different Pics.

I am not aware of any new plugin or update that caused this, I had no structurell chances the last days and this effect is completly new, although it is imaginable, that it is a few days old and I just recognize it for the first time.

I assume, the cause is WP itself or any interdependy between WP and SP, but not the Image-Tags iself, as they still work with external sources.

Again, the Links to the Pics are valid, I can easily open them with any browser. And I can easily integrate them via http in an WP article. So they *are* accessible. Just the Image Tag tells, they “can not be found”.

Any idea where to look? This is very strange to me.

Thanks in advance!

10 Answers

New Answer

HA Hari
Hari
Member

Ah! I withdraw my inital assessment. It seems to be directly SP related, in fact to BB Code.

I changed from BB Code Editor to Tiny MCE and “Voila”, the images display again.

Changed to BB Code back, and the “picture not found” message pops up again but *only* for my own WP media images.

So I guess we can exclude a general WP problem, it seems to be directly related to BB Code.

Any idea?

(If I knew this earlier, I would have created this thread in the forum for plugins – please move if you want)

HA Hari
Hari
Member

*Very funny*

Another test.

(1)

I add a post with TinyMCE and embed the Image via the TinyMCE function.

Everything is fine, the Image shows.

(2)

I revert back to BB Code in the profile

(3)

I open and edit the post (created with TinyMCE) again with BB Code. All I see is the perfect code as it should be with the IMG-Tag on the left and the /IMG-Tag on the right and the Image-Link in between.

(4)

I press “Save edited Post” *without changing anything*!

And the error is there again.

The Image is not shown and it says in brackets, that the image can not be found.

But again, *only* not shown for images in my own WP media container.

Funny? Yes 🙂

MP Mr Papa
Mr Papa
Member

can you give us the url for the images?  are they relative or absolute?  guessing the former but think bbcode requires absolute…  but could be wrong…

in both cases, tinymce or bbcode, are you entering the urls by hand?

HA Hari
Hari
Member

You got mail. Even with your own Avatar-Pic, behaviour is as described above.

I always cutn paste these things, never type.

YS Yellow Swordfish
Yellow Swordfish
Member

@mr-papa – The PM must have only been sent to you as there is nothing in my inbox.

I have tried this from every angle I can think of – switching editors back and forth and making edits – re-saving etc., and I have been unable to replicate the problem. Not sure what the reference is to ‘Avatar-Pic’ – or how it fits in with the base issue.

HA Hari
Hari
Member

Now I forwarded my mail to you too “Yellow Swordfish”. At least I hope so, I got some error message I should not use the mail system to open support cases.

The “Avatar” is just Mr. Papas Forum Picture here, I used it as testobject, as this way the picture itself is not in doubt to be part of the problem.

MP Mr Papa
Mr Papa
Member

not sure why you linked me to the picture???

it doesnt tell me the answer to my question…  in the bbcode editor, when do the image, are you using relative or absolute url?

@yellow-swordfish he just means the image he is using in the post – my avatar pic..

any particular reason its uploaded into wp media library vice just using our image uploader?

unfortunately, your forum is behind paywall so I cannot look at any of the examples…

HA Hari
Hari
Member

1) absolute url

2) what I sent you via E-Mail, was a http-link to an image (your avatar in fact) that directs via absolute url into my media library. If I use this link in BB Code, I get the “picture not found” message. But you can easily see, that the link works. In TinyMCE everything works perfectly.

3) I dont see why you want access, as I said, I gave you a HTML Link that doesnt work in BB Code. As a first step it would be suffice, if you confirm that this link *works* in your environment in BB Code and the picture can be shown via image-tags.

4) Reason for using wp media library is the wish to have media in one place for ease of backup. But this is not the issue here.

Please take the absolute HTML Link I sent you in my mail *as is* and use it yourself. Can you confirm, that it is working via image tags in BB Code?

If yes, I need to do some further testing myself before coming back. Maybe I reinstall BBcode again as a first measure.

YS Yellow Swordfish
Yellow Swordfish
Member

I can confirm that if I try this with the image from your server then the problem occurs. This happens in the post save process. My next step will be to review that to see what conditions might apply. And yes – I AM able to display the image in my browser using the raw url.

However… if I do exactly the same thing using (1) an image in my media library on my local development machine and (2) an image in the media library of this live, public site – then I experience no such problem. The image urls are saved and then displayed as expected.

So this is not quite as simple or cut and dried as it first appears…!

YS Yellow Swordfish
Yellow Swordfish
Member

So – moving on – some more information.

The failure at save time will most probably be down to one of two things. The first – and the most unlikely – is that you have the php setting ‘allow_url_fopen‘ turned off. Unlikely because as you have noted, using the TinyMCE insert image dialog, all is well.

So that leaves the more obvious and, I am sure, the correct reason. 

Simple:Press requires knowledge of the image at save time. In particular it requires details of the image dimensions. When you use the TinyMCE insert image dialog you will note that it fills the dimensions after you insert the URL to the image. The dimensions then get added as part of the image tag and all is well. In fact, if you open the TM editor and simply paste in the image url without using the dialog you will get the same result as using the bbCode editor.

I honestly do not know how TinyMCE retrieves image dimensions but it will be using JavaScript of course.

Simple:Press uses php and we call the php function getimagesize() to do this job. And that, I believe, is the source of your failure. My initial guess is that you do not have the getimagesize() function within your php build. The manual has always stated that this function is a part of core php but I believe this to be incorrect and I believe the GD graphics library is necessary for it to function.

So – as a starting point in solving this, I think you need to check if the GD library is installed in your php build. Your host support should know this.