Image link location in a Image Web Part
This is a question to satisfy my curiousity, hopefully it is not too trivial for an answer. Why when I have the Image Link in an Image Web Part point to a path such as D:\Users\User Name\Pictures\image.jpg I get a red X as the image. But when I copy and paste the picture into the Image folder of the 12 hive, and use that as the Image Link the image displays properly?
July 24th, 2010 6:21am

The Image Web part can only use URI or UNC paths to the image you want to use it to display. A path to a file in a file system like you're showing above isn't going to work in the web part, because the web part can't access the file system like that. The Images folder in the 12 Hive is automatically mapped to a URI by SharePoint, that's why you can use it, although I wouldn't recommend making too much of a habit out of it. In general, you'll be better served by uploading the images into an Image Library and then linking to the files in that library with the web part. It's just not a good idea to get in the habit of making manual modifications to files in the 12 Hive or adding your own; Microsoft reserves the right to change the contents of the 12 Hive at any point they need to so your changes could be deleted or overwritten without any notice. JohnMCTS: WSS v3, MOSS 2007, and SCOM 2007 Now Available on Amazon - The SharePoint 2007 Disaster Recovery Guide. Coming Soon - The SharePoint 2010 Disaster Recovery Guide. My blog: My Central Admin.
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2010 7:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics