get rid of unnecessary images