Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display an image in a SharePoint 2010 Web Part

I would like to know how to display a local image in my SharePoint 2010 Web Part. I don't really know which url to write in the css.

like image 512
Brian Roisentul Avatar asked Feb 25 '11 19:02

Brian Roisentul


1 Answers

  1. Add SharePoint "Images" mapped folder to the project in Visual Studio. enter image description here

  2. Create a WEB-PART-NAME folder inside (to keep related images together and not overwrite some other image by accident).

  3. Place the image in this folder.

  4. Use the following URL: /_layouts/images/WEB-PART-NAME/IMAGE-FILENAME.png

like image 59
Marek Grzenkowicz Avatar answered Sep 24 '22 22:09

Marek Grzenkowicz