Delete unneeded images.