Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a sub site that has a list. The list includes images that are stored in an image library. When we type the relative path to the image SP changes it to an absolute path placing the domani in the path. We want to be able to copy the content from staging to production and absolute paths will cause a lot of rework. What is the best work around please? When we edit the path of the image in the SP list SP puts the domain back in.

Your insight is appreciated.

Thank you

share|improve this question
    
Always use Site Collection relative path if you can, meaning something like, e.g. /sites/mySiteCollection/mySubSite/Images/myimage.png (keep count of the Managed Path you use, e.g. /sites/ here) –  C. Marius - MVP Sep 25 '12 at 14:27
1  
@C.Marius: you showed a web application relative path, not a site collection relative path. Can you precise which is correct? –  Steve B Sep 25 '12 at 14:31
add comment

2 Answers

While it appears that it stores absolute path, if you have given relative path, it internally stores a relative path. I never had problem while exporting in scenario like yours. Just try exporting it (including images of course) and try it yourself.

share|improve this answer
    
Hmmmm....so when we move our staging environment to production (in a different domain) there will be no issue? Okay... Is there any documentation on this that I can read? Yes, we give relative path and save the list form item. then when we open it to edit we see an absolute path for the image. –  Dora Sep 25 '12 at 14:34
    
You can view the internal value of the list item with PowerShell. Get a reference to the list item and Write-Host the value in the column in question. –  RJ Cuthbertson Sep 25 '12 at 14:37
    
Not sure about the documentation, but this is very basic and you can check what is stored internally by viewing the item in tool like SharePoint Manager or described in comment above. –  Ashish Patel Sep 25 '12 at 14:51
add comment

Try adding the HTML tag in the top of the document:

http://www.w3schools.com/tags/tag_base.asp

The <base> tag specifies the base URL/target for all relative URLs in a document.

There can be at maximum one <base> element in a document, and it must be inside the <head> element.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.