Including images, cascading stylesheets, and JavaScript resources in a SharePoint solution

Within a Visual Studio SharePoint solution, we can map project folders to folders on the SharePoint server filesystem. For static content resources, such as images and style sheets, it is ideal to store them on the filesystem of the SharePoint server rather than in the content database of the SharePoint web applications. This allows Internet Information Services (IIS) to serve up content directly from the filesystem rather than having to request the file from the SQL database before serving it to the client.

There are a number of folders that we can map to, however, the most commonly mapped folders are the Layouts and Images folders. Files in our project ...

Get SharePoint 2013 WCM Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.