SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This was something I am more curious about, than a solid programming issue to be solved. Sorry about that in advance.

I noticed that when inserting images into a publishing page's Page Content field, SharePoint is doing something to track changes to that image's file name. I am just curious if anyone know what or how it does it.

If you change the file name in the library, or move it to a different folder in that library, it automatically updates the html link reference on the page it was inserted.

Pretty cool but it gets weirder.

If you manually paste in your own image link HTML code directly into the Edit HTML dialog for an image in your Images library (any library really, this works for documents too), and then go change the name or location, it updates your HTML.

If you change your img tag to point to a file that does not yet even exist, and THEN upload and image with that name, not only will it appear on your page (as expected) but if you update the image name in library, it updates your HTML correctly then too.

By this point the voodoo was too strong for me to fathom how this was possible, since it happens when the file is updated (seemingly), not when the HTML is updated, since you can put the link in first, and then update image name later.

Does anyone know, or have any decent guesses who this is done?

share|improve this question
up vote 2 down vote accepted

I think the forwardlinks property of an SPFile is what saves all of the info on where to update when this file changes:

As far as how this property get's populated, I am unsure.

share|improve this answer
Excellent! I think that is exactly what I wanted to know. The mechanism is less important to me than the existence of that property. – hitdrumhard May 1 '12 at 15:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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