Home
TeamSite
simple Image problem
Bhargav Coca
I have some images in my tpl which is show up right when i generate or preview it inisde the BOX. If i brwose it outside the box, the images are not showing up. Simar is the case when i try to preview my file on the deployed server. I am amking sure the path to be right, and i have deployed/submitted all my images to staging and production env. Still it doesn't show up. Please let me know here i am going wrong.
Thank You
Find more posts tagged with
Comments
nipper
Need more info than that I am afraid.
when you right click on the box what do you see ? What are the properies of the image &
is the file really there ?
It sounds like you are using absolute paths (/images/blah.jpg) but the content is not being deployed
in the docroot.
jkm
Can you check your content structure?
If your images are under directory structure like
WORKAREA/work/content/images/
and on live server you dont have "content" directory, In that case your images/files will be failed to display. You need to remove the "content" from the link while processing in your tpl file.
This was just my quick thought and hope this may help you
Bhargav Coca
You are right, I am using absolute path.
"I am saying / templatedata/CITS/contract/images/abc.jpg"
My directory structure is like this
I have templatedata/CITS/contract/images, where my images will be
I have docroot/docs which contains my doc file which use these images.
templatedata and docroot are peers.
And in Prod, I have CITS folder under which Contracts and docs are peers.
Contracts\CITS\Contract\images\abc.jpg
and
Contracts\CITS\docs\mydoc.doc
Sorry if i am confusing.
Thank you
nipper
When you bring up the page, do you bring up
http://server/docroot/doc/newly_generated_page.html
or
http://server/doc/newly_generated_page.html
If it is the latter, then the absolute paths will not work, since templatedata is outside of that
BTW, I would suggest moving the images directory out of the templatedata directory, to the WA docroot itself.
do you get an image from this (I assume no)
http://server/templatedata/CITS/contract/images/blah.jpg
jkm
I think you need to straighten your directory structure first. Images shud not be under templatedata.
Ideally these shud be under WORKAREA/work/Contracts/images not under templatedata
CITS shud be your branch name. This is the usual mapping works between TS and prod server or you need to change OpenDepoy conf file to deploy in appropriate dirctories and then process your tpl to stip the prefixes like docroot.
Bhargav Coca
Moved my images folder under docroot, but it doesn't work that way either.
<table width="600">
<tr>
<td width="600" colspan="2">
<img src="docroot/images/line">
</td>
</tr>
</table>
Thank you
nipper
try removing the docroot
<img src="images/line">
jkm
As Andy mentioned above
1. Try removing docroot
2. "line" doesnt look like an image. I hope you have put something dummy.
3. Check on the live server, do you have the image there and if image is there wats the path of image on live server
4. path of image on TS
jbonifaci
lilleywhite,
The basic use of images within TeamSite goes something like this:
1) Determine where you want your images to reside on your webservers. (Lets say you decide on
/inetpub/website/images where the webroot is
/inetpub/website).
2) Create a directory named images (the path to your images directory on your web server minus the webroot) in your workarea. (so the "images" directory should be at the same level as "templatedata", not below it).
3) In your DCT create a browse element that browses the images directory. (i.e. <browser extns=".gif,.jpg" size="50" required="t" initial-dir="/images" ceiling-dir="/images"/>)
4) In your TPL, read this item in and include the path that was selected in your image tag. (<img src="/images/subDirectory/image.jpg" />)
5) When this content is deployed, you need to deploy both the generated html file AND the image to the web server. Just deploying the generated file will not get the image to the web server. The image from #4 should be deployed to the webserver so that it resides in
/inetpub/website/images/subDirectory/image.jpg.
If you follow all of the above steps, your images should show up in both your preview file and when your content is deployed to the web server.
~Jeff
Bhargav Coca
You are right, I have done exactly as you said, it works in terms of generating html's. But in terms of Doc files it is not working the same. My client doesn't want to choose the image inside the DCT, so i have it hard coded inside my tpl as you said <img src="/images/line.jpg"/>, it is not working interms of word document.
Thank you
Bhargav Coca
I seriously doubt , on how my word document is getting the images. I played around some word documents which i have "Inserted" Images into and they are vieweable everywhere. But the way temasite is writting into a word document is though link process, which is blowing up the whole thing outside the box. Is there anyway to insert the picute into the word doc through my tpl?
Thank you in advance
brandon1
So you are trying to insert an <a href=""> tag into a word document? If that is true not sure that was made clear....
Current Project: TS 6.1
Environment: Windows
Bhargav Coca
Not a <a href ......../> Rather <img scr="/images/abc.jpg"/>. IT doesn't seem to work for me.
Thank you
nipper
I know I asked, but do not remember an answer, can you see the image in a browser ?
http://servername/images/abc,jpg
Also, when you see it in TS, are you one the TS server or on a client ?
jbonifaci
Here's a good question you need to answer. Lets say you create your word doc with an img tag that references '/images/abc.jpg'. If you create a simple html page with an img tag that references '/images/abc.jpg' as well and deploy it to your webserver, does the image show up for that html page or not? If not, then the image does not exist in the location you are referring to it.
Edit: Or do what Andy suggested and just try to reference the image directly on the webserver.
~Jeff
Edited by jbonifaci on 11/16/05 09:23 AM (server time).
Bhargav Coca
I am sorry, Yes i can see my images both on the TS server and as a Client. I see all my images in the browser sir.
Thank you
Bhargav Coca
Yes i have already tried this procedure, With html files there is not problem at all, I reference the same image in the html file generate the html file, I can see the images on the TS server and as a client too. Even if i deploy the html page to prod server, i can see the images . It only with the word document i don't see the images. Here is a Sample word generating tpl i am attaching, any one can try this with their own images it will not work for you.
Thank you
jbonifaci
Can you attach the word document you are generating?
brandon1
<table width="600">
<tr>
<td width="600" colspan="2">
<img src="Y:/default/main/NECWEB/WORKAREA/CPP/images/line"/>
</td>
</tr>
<tr>
<td align="left">
<span class="style1">
NEC USA, Inc.<BR>
Corporate IT Services<BR>
Irving, Texas
</span>
</td>
<td align="right">
<span class="style1">
<img src="Y:/default/main/NECWEB/WORKAREA/CPP/images/NECLogo.jpg"/>
</span>
</td>
</tr>
<tr>
<td width="600" colspan="2">
<img src="Y:/default/main/NECWEB/WORKAREA/CPP/images/line"/>
</td>
</tr>
</table>
Since this is a word document and rendered on the client machine you need a URL to the image on a server.
Current Project: TS 6.1
Environment: Windows
Bhargav Coca
here it is, i am on the TS server while attaching this
Thank you
jkm
I think Brandon has hit the target :-)
In your tpl if you enter
http://servername/images/line.jpg
instead of /image/line.jpg and see if it works
Bhargav Coca
Nope, That didn't quite work for me.
Thank you
Bhargav Coca
I even tried the entire URL
http://dlint14/iw/cci/meta/injection/iw-mount/default/main/NECWEB/WORKAREA/CPP/images/NECLogo.jpg
Doesn't work.
But the image openup , if you use the same url inside the browser.
Thank you
brandon1
Can you attach the word doc with the URL for the image.
Current Project: TS 6.1
Environment: Windows