Remove unused images; resize the rest