1

In SharePoint 2010 there is an image called formatmap32x32.png which holds all the icon image for the ribbon.

I am building a masterpage and almost done with. The only thing missing is how to change this image programmatically to my own redesigned icons so the user who's going to use my master-page doesn't have to change the image manually by replacing the default picture in the images folder in sharepoint?

the icons should be in one image just like the default one from sharepoint.

the is the default image:

http://s23.postimg.org/j9fqu2iqz/formatmap32x32.png

Any one have any idea on how to?

1 Answer 1

1

All the ICONS on the ribbon has a unique ID. You can use browser developer tools to find it.

Once you have the ID, you can change the image using CSS

#IconId {
    background-image: url('new icon url');
}
8
  • First of all, thank you for your answer. But form my understanding now, there is no other way like swapping the image with the new one and letting everything be the same?rather going on all the ribbon ID icons?
    – R.Karar
    Commented Dec 31, 2014 at 13:36
  • @R.Karar, its and img tag and you can change the SRC property. Commented Dec 31, 2014 at 13:41
  • Actually I just found out how. In my VS project under the folder Layouts I created a folder with a name of 1033, inside it an other folder called IMAGES and paste the new image.
    – R.Karar
    Commented Dec 31, 2014 at 13:56
  • @R.Karar are you replacing the existing file? Commented Dec 31, 2014 at 13:57
  • My only issue now is how to tell the solution to put the new image when its active, and remove it and back to the old one when its detective? is there away to do that like in the event receiver?
    – R.Karar
    Commented Dec 31, 2014 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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