Small refactoring: removed code duplication between icon and thumbnail generation