When deleting an image, the file and the thumbnail are removed