unnecessary images are removed