Thursday, January 28, 2010

Server relative and page relative URL for images in the Layouts directory

I was recently creating my custom RSS feeds in SharePoint 2007 and i came across an interesting yet simple issue with getting the RSS icon to render correctly. When I first deployed my site with the RSS icon references, I got a blank image instead of my RSS Icon. The issue was, I used page relative URLs instead of server URLs when referencing the RSS image.












The first image uses a page relative URL reference. The second image uses a server relative URL reference.









I just changed my URL reference from page relative to server relative and the RSS image rocked up.

No comments: