fixed bug in deleting old images
image cropping functionality