Whenever a image is uploaded for an entity generalized with System.Image, it creates two records in System.FileDoucment. One is for the storing the contents of the image and another one is the thumbnail image which gets automatically created in the Database. So whenever a image is uploaded actually two records get created in System.FileDocument.
Now, the problem is that whenever a image is deleted, only the record with image contents get deleted and not the thumbnail image.
If a application is dealing with large amount of images, it will create and memory problem because even the actual images where deleted the thumbnails of those are still present in the database.
Delete the thumbnail record when we delete the photo.