Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I used the blog template when creating a new subsite within mysites and in the process an associated list called Photos got created.

While this has worked well, I've noticed that when I delete a blog post that contained some images (filetype is .png), the images that were part of the blog post content remain behind.

Is there a setting that results in something like "delete any images for the blog post when the blog item is deleted"?

This is Sharepoint 2010 Server Enterprise Edition SP1.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

This is the OOTB functionality, probably based on the thought that you might use the same pictures in more than one place, even in other places than a blog post.

If that is the case, and SharePoint just deletes the image on post deletion, you would get corrupt image links in all other places referencing that particular image file.

You could write an ItemDeleting Event Receiver that parses the body of the blog post for image links and then removes them from their resp. libraries before the blog post is deleted.

share|improve this answer
add comment

Your Answer

 
discard

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.