deleteThumbnails function added

This time I keep the fixes and extra functionality separate. 

Do I have to add the source parameter as proposed by @Siesqo? Any other remarks? Blog module will be edited when this function is approved.