Delete unnecessary images.