Unnecessary images are removed