Forum Moderators: open

Message Too Old, No Replies

IMG tag problem with src attribute

image wont display if numbers in src url

         

jpbasekramer

8:38 pm on Jun 4, 2005 (gmt 0)

10+ Year Member



Hello,

I am having problems getting images displayed. I need to display images with the url's that are in the format:

<img src='/contacts/4270/01ZTAE.jpg'

However they dont appear in the browser in this format because of the numbers in the link. When I change it to:
<img src='/contacts/ZTAE.jpg' the image displays correctly.

Does anyone know how I can keep my original format and get the image to display?

Thank you

Span

9:36 pm on Jun 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

the only thing I can say is that the numbers are not the reason your images won't appear. It really must be something else. Something like Apache rewriting URLs maybe?

jpbasekramer

11:14 am on Jun 5, 2005 (gmt 0)

10+ Year Member



Hi,

The output for the page from view soucre, for the IMG tag is:

<img src='../pictures/contacts/ZTAE.jpg' alt='If you cant view this photo please contact help@example.com quoting messageid:67' height='143' width='174'>

yet the photo is not displayed. If it is Apache messing with the URL's would I see it here? Do you know where I should look for it so I know whats happening?

Thank you

[edited by: Woz at 3:04 am (utc) on June 6, 2005]
[edit reason] Examplified Email [/edit]

g1smd

4:28 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It must be that the images are not in the folder that you say they are in, or the folder is not in the place that that path points to.

Your URL is a relative URL starting with .. which means "go up one from here, before going back down". "Here" may be elsewhere.

Change the link to start with a / and then use the full path to the file counting from the root. I am guessing that will fix the problem.